
package tools;


import client.*;
import client.inventory.*;
import client.skills.SkillEntry;
import client.skills.SkillMacro;
import configs.ServerConfig;
import constants.*;
import handling.channel.DojoRankingsData;
import handling.channel.handler.AttackInfo;
import handling.channel.handler.InventoryHandler;
import handling.opcode.BossEffectOpcode;
import handling.opcode.EffectOpcode;
import handling.opcode.FieldEffectOpcode;
import handling.opcode.SendPacketOpcode;
import handling.world.WorldAllianceService;
import handling.world.WorldGuildService;
import handling.world.guild.MapleGuild;
import handling.world.guild.MapleGuildAlliance;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import server.MapleDueyActions;
import server.MapleItemInformationProvider;
import server.MerchItemPackage;
import server.RankingWorker;
import server.events.MapleSnowball;
import server.maps.*;
import server.movement.LifeMovementFragment;
import server.quest.MapleQuest;
import server.shops.HiredFisher;
import server.shops.HiredMerchant;
import server.shops.MaplePlayerShopItem;
import tools.data.output.MaplePacketLittleEndianWriter;
import tools.packet.*;

import java.awt.*;
import java.util.*;
import java.util.List;


 public class MaplePacketCreator {
    /*   49 */   public static final List<Pair<MapleStat, Long>> EMPTY_STATUPDATE = Collections.emptyList();
    /*   50 */   private static final Logger log = LogManager.getLogger(MaplePacketCreator.class);



    public static byte[] getWzCheck(String WzCheckPack) {
        /*   53 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*   54 */
        mplew.writeShort(SendPacketOpcode.WZ_CHECK.getValue());
        /*   55 */
        mplew.write(HexTool.getByteArrayFromHexString(WzCheckPack));
        /*   56 */
        return mplew.getPacket();

    }









    public static byte[] getClientAuthentication(int fileValue) {
        /*   66 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*   67 */
        mplew.writeShort(SendPacketOpcode.CLIENT_AUTH.getValue());
        /*   68 */
        mplew.writeInt(fileValue);
        /*   69 */
        return mplew.getPacket();

    }

































    public static byte[] getServerIP(MapleClient c, int port, int charId) {
        /*  103 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  105 */
        mplew.writeShort(SendPacketOpcode.SERVER_IP.getValue());
        /*  106 */
        mplew.writeShort(0);
        /*  107 */
        mplew.write(ServerConstants.NEXON_IP);
        /*  108 */
        mplew.writeShort(port);



        /*  112 */
        mplew.write(ServerConstants.NEXON_IP);
        /*  113 */
        mplew.writeInt(charId);
        /*  114 */
        mplew.write(0);
        /*  115 */
        mplew.writeInt(0);
        /*  116 */
        mplew.write(0);
        /*  117 */
        mplew.writeLong(1L);
        /*  118 */
        return mplew.getPacket();

    }










    public static byte[] getChannelChange(MapleClient c, int port) {
        /*  129 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  131 */
        mplew.writeShort(SendPacketOpcode.CHANGE_CHANNEL.getValue());
        /*  132 */
        mplew.write(1);
        /*  133 */
        mplew.write(ServerConstants.NEXON_IP);
        /*  134 */
        mplew.writeShort(port);
        /*  135 */
        mplew.write(0);

        /*  137 */
        return mplew.getPacket();

    }







    public static byte[] cancelTitleEffect() {
        /*  145 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  147 */
        mplew.writeShort(SendPacketOpcode.CANCEL_TITLE_EFFECT.getValue());
        /*  148 */
        for (int i = 0; i < 5; i++) {
            /*  149 */
            mplew.writeShort(0);
            /*  150 */
            mplew.write(-1);

        }

        /*  153 */
        return mplew.getPacket();

    }



    public static byte[] getWarpToMap(MapleCharacter player, boolean firstLoggedIn) {
        /*  157 */
        return getWarpToMap(player, true, null, 0, firstLoggedIn);

    }



    public static byte[] getWarpToMap(MapleCharacter player, MapleMap to, int spawnPoint) {
        /*  161 */
        return getWarpToMap(player, false, to, spawnPoint, false);

    }









    public static byte[] getWarpToMap(MapleCharacter player, boolean load, MapleMap to, int spawnPoint, boolean firstLoggedIn) {
        /*  171 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  173 */
        mplew.writeShort(SendPacketOpcode.WARP_TO_MAP.getValue());

        /*  175 */
        mplew.writeShort(1);
        /*  176 */
        mplew.writeInt(1);
        /*  177 */
        mplew.writeInt(1);

        /*  179 */
        mplew.writeInt(player.getClient().getChannel() - 1);
        /*  180 */
        mplew.write(0);
        /*  181 */
        mplew.writeInt(0);
        /*  182 */
        mplew.write(0);
        /*  183 */
        mplew.write(Math.min(player.getCMapCount(), 255));
        /*  184 */
        mplew.writeInt(!load ? to.getFieldType() : 0);
        /*  185 */
        mplew.write(0);
        /*  186 */
        mplew.writeInt(player.getMap().getBottom() - player.getMap().getTop());
        /*  187 */
        mplew.writeInt(player.getMap().getRight() - player.getMap().getLeft());
        /*  188 */
        mplew.writeBool(load);
        /*  189 */
        mplew.writeShort(0);
        /*  190 */
        if (load) {
            /*  191 */
            for (int i = 0; i < 3; i++) {
                /*  192 */
                mplew.writeInt(Randomizer.nextInt());

            }
            /*  194 */
            PacketHelper.addCharacterInfo(mplew, player, -1L);


            /*  197 */
            mplew.write(1);
            /*  198 */
            mplew.write(0);

            /*  200 */
            mplew.write(0);
            /*  201 */
            mplew.write(0);
            /*  202 */
            mplew.writeLong(0L);
            /*  203 */
            mplew.writeInt(0);
            /*  204 */
            mplew.write(0);
            /*  205 */
            mplew.write(0);

        } else {
            /*  207 */
            mplew.write(0);
            /*  208 */
            mplew.writeInt(to.getId());
            /*  209 */
            mplew.write(spawnPoint);
            /*  210 */
            mplew.writeInt(player.getStat().getHp());
            /*  211 */
            mplew.writeInt(0);

        }
        /*  213 */
        mplew.writeShort(0);
        /*  214 */
        mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));
        /*  215 */
        mplew.writeInt(100);



        /*  219 */
        mplew.write(0);





        /*  225 */
        mplew.write(0);
        /*  226 */
        mplew.writeBool(JobConstants.canUseFamiliar(player.getJob()));

        /*  228 */
        mplew.writeMapleAsciiString(player.getId() + "");

        /*  230 */
        byte[] familiar = FamiliarPacket.FamiliarWarpToMap(player, load);
        /*  231 */
        mplew.writeInt(familiar.length);
        /*  232 */
        mplew.write(familiar);


        /*  235 */
        mplew.writeBool(false);
        /*  236 */
        mplew.writeBool(false);
        /*  237 */
        mplew.writeBool(false);


        /*  240 */
        if (to != null && (to.getId() == 105200110 || to.getId() == 105200510)) {
            /*  241 */
            mplew.write(0);

        }
        /*  243 */
        mplew.writeInt(0);
        /*  244 */
        mplew.write(0);
        /*  245 */
        mplew.writeInt(0);
        /*  246 */
        mplew.writeInt(0);


        /*  249 */
        mplew.writeBool(true);
        /*  250 */
        mplew.writeInt(-1);

        /*  252 */
        mplew.writeInt(0);
        /*  253 */
        mplew.writeInt(0);

        /*  255 */
        mplew.writeHexString("FF C9 9A 3B");
        /*  256 */
        mplew.writeHexString("FF C9 9A 3B");

        /*  258 */
        mplew.writeMapleAsciiString("打招呼只能在<夜店万圣节>中进行");

        /*  260 */
        boolean UIWindowEventMessage = false;
        /*  261 */
        mplew.writeBool(UIWindowEventMessage);
        /*  262 */
        if (UIWindowEventMessage) {
            /*  263 */
            mplew.writeMapleAsciiString("UI/UIWindowEvent.img/sundayMaple");
            /*  264 */
            mplew.writeMapleAsciiString("#sunday# #fs20##fc0xFFFFFFFF#星之力打折 30%#fc0xFFFFD800#\n#sunday# #fs20##fc0xFFFFFFFF#野外怪物掉落的声望勋章中获得的声望量#fc0xFFFFD800");

            /*  266 */
            mplew.writeMapleAsciiString("#fn???? ExtraBold##fs15##fc0xFFB7EC00#2019年11月03日周日");

        }




        /*  272 */
        mplew.writeInt(0);



        /*  276 */
        mplew.write(1);
        /*  277 */
        mplew.writeInt(0);
        /*  278 */
        return mplew.getPacket();

    }








    public static byte[] enableActions() {
        /*  287 */
        return updatePlayerStats(EMPTY_STATUPDATE, true, null);

    }










    public static byte[] updatePlayerStats(List<Pair<MapleStat, Long>> stats, MapleCharacter chr) {
        /*  298 */
        return updatePlayerStats(stats, false, chr);

    }



    public static byte[] updatePlayerStats(List<Pair<MapleStat, Long>> stats, boolean itemReaction, MapleCharacter chr) {
        /*  302 */
        return updatePlayerStats(stats, itemReaction, chr, false);

    }












    public static byte[] updatePlayerStats(List<Pair<MapleStat, Long>> stats, boolean itemReaction, MapleCharacter chr, boolean isWarlock) {
        /*  315 */
        if (ServerConfig.DEBUG_MODE) {
            /*  316 */
            log.trace("调用updatePlayerStats");

        }
        /*  318 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  320 */
        mplew.writeShort(SendPacketOpcode.UPDATE_STATS.getValue());
        /*  321 */
        mplew.write(itemReaction ? 1 : 0);
        /*  322 */
        mplew.write(0);
        /*  323 */
        long updateMask = 0L;
        /*  324 */
        for (Pair<MapleStat, Long> statupdate : stats) {
            /*  325 */
            updateMask |= ((MapleStat) statupdate.getLeft()).getValue();

        }
        /*  327 */
        if (stats.size() > 1) {
            /*  328 */
            stats.sort((o1, o2) -> {

                long val1 = ((MapleStat) o1.getLeft()).getValue();

                long val2 = ((MapleStat) o2.getLeft()).getValue();

                return (val1 < val2) ? -1 : ((val1 == val2) ? 0 : 1);

            });

        }
        /*  334 */
        mplew.writeLong(updateMask);
        /*  335 */
        for (Pair<MapleStat, Long> statupdate : stats) {
            /*  336 */
            switch ((MapleStat) statupdate.getLeft()) {


                case 皮肤:

                case 疲劳:
                    /*  340 */
                    mplew.write(((Long) statupdate.right).byteValue());

                    continue;

                case ICE_GAGE:

                case 力量:

                case 敏捷:

                case 智力:

                case 运气:

                case AVAILABLEAP:
                    /*  348 */
                    mplew.writeShort(((Long) statupdate.getRight()).shortValue());

                    continue;

                case 职业:
                    /*  351 */
                    mplew.writeShort(((Long) statupdate.getRight()).shortValue());
                    /*  352 */
                    mplew.writeShort((short) chr.getSubcategory());

                    continue;
















                case AVAILABLESP:
                    /*  370 */
                    PacketHelper.addCharSP(mplew, chr);

                    continue;

                case 经验:

                case 金币:
                    /*  374 */
                    mplew.writeLong(((Long) statupdate.getRight()).longValue());

                    continue;

                case TODAYS_TRAITS:
                    /*  377 */
                    mplew.writeZeroBytes(21);

                    continue;

                case TRAIT_LIMIT:
                    /*  380 */
                    mplew.write(0);
                    /*  381 */
                    mplew.writeInt(0);
                    /*  382 */
                    mplew.writeInt(0);
                    /*  383 */
                    mplew.writeInt(0);
                    /*  384 */
                    mplew.write(0);

                    continue;

                case BATTLE_EXP:
                    /*  387 */
                    chr.getCharacterCard().connectData(mplew);

                    continue;

                case BATTLE_RANK:
                    /*  390 */
                    mplew.writeInt((chr.getStat()).pvpExp);
                    /*  391 */
                    mplew.write((chr.getStat()).pvpRank);
                    /*  392 */
                    mplew.writeInt(chr.getBattlePoints());

                    continue;

                case BATTLE_POINTS:
                    /*  395 */
                    mplew.write(5);
                    /*  396 */
                    mplew.write(6);

                    continue;

            }
            /*  399 */
            mplew.writeInt(((Long) statupdate.getRight()).intValue());

        }


        /*  403 */
        mplew.write((chr != null) ? chr.getHairBaseColor() : -1);
        /*  404 */
        mplew.write((chr != null) ? chr.getHairMixedColor() : 0);
        /*  405 */
        mplew.write((chr != null) ? chr.getHairProbColor() : 0);
        /*  406 */
        mplew.writeBool((updateMask == 0L || !itemReaction));
        /*  407 */
        if (updateMask == 0L || !itemReaction) {
            /*  408 */
            mplew.write(0);

        }
        /*  410 */
        mplew.writeBool(false);
        /*  411 */
        return mplew.getPacket();

    }






    public static byte[] instantMapWarp(byte portal) {
        /*  418 */
        if (ServerConfig.DEBUG_MODE) {
            /*  419 */
            log.trace("调用instantMapWarp");

        }
        /*  421 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  423 */
        mplew.writeShort(SendPacketOpcode.CURRENT_MAP_WARP.getValue());
        /*  424 */
        mplew.writeShort(0);
        /*  425 */
        mplew.writeInt(portal);
        /*  426 */
        mplew.write(0);
        /*  427 */
        return mplew.getPacket();

    }






    public static byte[] flameMark() {
        /*  434 */
        if (ServerConfig.DEBUG_MODE) {
            /*  435 */
            log.trace("调用instantMapWarp");

        }
        /*  437 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  439 */
        mplew.writeShort(SendPacketOpcode.FLAME_MARK.getValue());
        /*  440 */
        mplew.write(1);
        /*  441 */
        mplew.writeInt(0);

        /*  443 */
        return mplew.getPacket();

    }



    public static byte[] flameMark(int skillid) {
        /*  447 */
        if (ServerConfig.DEBUG_MODE) {
            /*  448 */
            log.trace("调用flameMark");

        }
        /*  450 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  452 */
        mplew.writeShort(SendPacketOpcode.FLAME_MARK.getValue());
        /*  453 */
        mplew.write(1);
        /*  454 */
        mplew.writeInt(skillid);

        /*  456 */
        return mplew.getPacket();

    }






    public static byte[] instantMapWarp(int charId, Point pos) {
        /*  463 */
        if (ServerConfig.DEBUG_MODE) {
            /*  464 */
            log.trace("调用instantMapWarp");

        }
        /*  466 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  468 */
        mplew.writeShort(SendPacketOpcode.CURRENT_MAP_WARP.getValue());
        /*  469 */
        mplew.write(0);
        /*  470 */
        mplew.write(3);
        /*  471 */
        mplew.writeInt(charId);
        /*  472 */
        mplew.writePos(pos);

        /*  474 */
        return mplew.getPacket();

    }







    public static byte[] instantMapWarp(boolean b, int type, int charId, Point pos) {
        /*  482 */
        if (ServerConfig.DEBUG_MODE) {
            /*  483 */
            log.trace("调用instantMapWarp");

        }
        /*  485 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  487 */
        mplew.writeShort(SendPacketOpcode.CURRENT_MAP_WARP.getValue());
        /*  488 */
        mplew.writeBool(b);
        /*  489 */
        mplew.write(type);
        /*  490 */
        if (type <= 0) {
            /*  491 */
            mplew.writeInt(charId);
            /*  492 */
            mplew.write(0);

        } else {
            /*  494 */
            mplew.writeInt(charId);
            /*  495 */
            mplew.writePos(pos);

        }

        /*  498 */
        return mplew.getPacket();

    }












    public static byte[] spawnPortal(int townId, int targetId, int skillId, Point pos) {
        /*  511 */
        if (ServerConfig.DEBUG_MODE) {
            /*  512 */
            log.trace("调用spawnPortal");

        }
        /*  514 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  516 */
        mplew.writeShort(SendPacketOpcode.SPAWN_PORTAL.getValue());
        /*  517 */
        mplew.writeInt(townId);
        /*  518 */
        mplew.writeInt(targetId);
        /*  519 */
        if (townId != 999999999 && targetId != 999999999) {
            /*  520 */
            mplew.writeInt(skillId);
            /*  521 */
            mplew.writePos(pos);

        }

        /*  524 */
        return mplew.getPacket();

    }












    public static byte[] spawnDoor(int ownerId, int skillId, Point pos, boolean animation) {
        /*  537 */
        if (ServerConfig.DEBUG_MODE) {
            /*  538 */
            log.trace("调用spawnDoor");

        }
        /*  540 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  542 */
        mplew.writeShort(SendPacketOpcode.SPAWN_DOOR.getValue());
        /*  543 */
        mplew.write(animation ? 0 : 1);
        /*  544 */
        mplew.writeInt(ownerId);
        /*  545 */
        mplew.writeInt(skillId);
        /*  546 */
        mplew.writePos(pos);

        /*  548 */
        return mplew.getPacket();

    }










    public static byte[] removeDoor(int ownerId, boolean animation) {
        /*  559 */
        if (ServerConfig.DEBUG_MODE) {
            /*  560 */
            log.trace("调用removeDoor");

        }
        /*  562 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*  563 */
        mplew.writeShort(SendPacketOpcode.REMOVE_DOOR.getValue());
        /*  564 */
        mplew.write(animation ? 0 : 1);
        /*  565 */
        mplew.writeInt(ownerId);

        /*  567 */
        return mplew.getPacket();

    }






    public static byte[] resetScreen() {
        /*  574 */
        if (ServerConfig.DEBUG_MODE) {
            /*  575 */
            log.trace("调用resetScreen");

        }
        /*  577 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  579 */
        mplew.writeShort(SendPacketOpcode.RESET_SCREEN.getValue());

        /*  581 */
        return mplew.getPacket();

    }














    public static byte[] mapBlocked(int type) {
        /*  596 */
        if (ServerConfig.DEBUG_MODE) {
            /*  597 */
            log.trace("调用mapBlocked");

        }
        /*  599 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  601 */
        mplew.writeShort(SendPacketOpcode.MAP_BLOCKED.getValue());
        /*  602 */
        mplew.write(type);

        /*  604 */
        return mplew.getPacket();

    }













    public static byte[] serverBlocked(int type) {
        /*  618 */
        if (ServerConfig.DEBUG_MODE) {
            /*  619 */
            log.trace("调用serverBlocked");

        }
        /*  621 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  623 */
        mplew.writeShort(SendPacketOpcode.SERVER_BLOCKED.getValue());
        /*  624 */
        mplew.write(type);

        /*  626 */
        return mplew.getPacket();

    }












    public static byte[] partyBlocked(int type) {
        /*  639 */
        if (ServerConfig.DEBUG_MODE) {
            /*  640 */
            log.trace("调用partyBlocked");

        }
        /*  642 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  644 */
        mplew.writeShort(SendPacketOpcode.PARTY_BLOCKED.getValue());
        /*  645 */
        mplew.write(type);

        /*  647 */
        return mplew.getPacket();

    }



    public static byte[] serverMessage(String message) {
        /*  651 */
        return serverMessage(4, 0, message, false);

    }



    public static byte[] serverNotice(String message) {
        /*  655 */
        return serverNotice(0, message);

    }



    public static byte[] serverAlert(String message) {
        /*  659 */
        return serverNotice(1, message);

    }



    public static byte[] serverSpeakerChannel(String message) {
        /*  663 */
        return serverNotice(2, message);

    }



    public static byte[] serverSlide(String message) {
        /*  667 */
        return serverNotice(4, message);

    }



    public static byte[] serverEvent(String message) {
        /*  671 */
        return serverNotice(5, message);

    }



    public static byte[] serverWithoutPrefix(String message) {
        /*  675 */
        return serverNotice(6, message);

    }




    public static byte[] serverNotice(int type, String message) {
        /*  680 */
        return serverMessage(type, 0, message, false);

    }



    public static byte[] serverNotice(int type, int channel, String message) {
        /*  684 */
        return serverMessage(type, channel, message, false);

    }



    public static byte[] serverNotice(int type, int channel, String message, boolean smegaEar) {
        /*  688 */
        return serverMessage(type, channel, message, smegaEar);

    }



    private static byte[] serverMessage(int type, int channel, String message, boolean megaEar) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*
         * 0x00: [公告事项]
         * 0x01: 提示框
         * 0x02: 小喇叭
         * 0x03: 高品质喇叭
         * 0x04: 置顶公告
         * 0x05: 红色字
         * 0x06: 蓝色字
         * 0x08: 道具喇叭
         * 0x09: 带耳朵的道具喇叭
         * 0x0A: 特效喇叭
         * 0x0B: 黄字抽奖喇叭后面message发完后跟着的是物品ID
         * 0x0D: 5E 00 0D [5D DB] [60 EA 00 00] 任务头顶提示 T071修改 以前0x0C
         * 0x0E: 5E 00 0E [5D DB] 停止任务提示 T071修改 以前0x0D
         * 0x0E: 白色喇叭
         * 0x18: 蛋糕高级喇叭 V.117.1修改 以前0x16
         * 0x19: 馅饼高级喇叭 V.117.1修改 以前0x17
         * 0x1A: 心脏高级喇叭 V.117.1修改 以前0x18
         * 0x1B: 白骨高级喇叭 V.117.1修改 以前0x19
         */
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        if (type == 0x18) {
            type = 0x28;
        } else if (type == 0x19) {
            type = 0x32;
        }
        mplew.write(type);
        if (type == 0x04) {
            mplew.write(1);
        }
        mplew.writeMapleAsciiString(message);
        switch (type) {
            case 0x03: //高品质喇叭
            case 0x09: //道具喇叭
            case 0x28: //蛋糕高级喇叭 +0x10
            case 0x32: //馅饼高级喇叭 +0x19
            case 0x1A: //心脏高级喇叭
            case 0x1B: //白骨高级喇叭
                mplew.write(channel - 1); // channel
                mplew.write(megaEar ? 1 : 0);
                break;
            case 0x10:
                mplew.writeInt(channel - 1);
                break;
            case 0x06:
                mplew.writeInt(channel >= 1000000 && channel < 6000000 ? channel : 0); //cash itemID, displayed in yellow by the {name}
                break;
        }
        return mplew.getPacket();

    }






    public static byte[] getGachaponMega(String name, String message, Item item, int rareness, int channel) {
        /*  754 */
        if (ServerConfig.DEBUG_MODE) {
            /*  755 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /*  757 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  759 */
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        /*  760 */
        mplew.write(34);
        /*  761 */
        mplew.writeMapleAsciiString(name + message);
        /*  762 */
        mplew.writeInt(item.getItemId());
        /*  763 */
        mplew.writeInt((channel > 0) ? (channel - 1) : -1);
        /*  764 */
        mplew.writeInt((rareness == 1) ? 0 : ((rareness == 3) ? 3 : 2));
        /*  765 */
        mplew.write(1);
        /*  766 */
        PacketHelper.addItemInfo(mplew, item);

        /*  768 */
        return mplew.getPacket();

    }



    public static byte[] getAniMsg(int questID, int time) {
        /*  772 */
        if (ServerConfig.DEBUG_MODE) {
            /*  773 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /*  775 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  777 */
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        /*  778 */
        mplew.write(13);
        /*  779 */
        mplew.writeShort(questID);
        /*  780 */
        mplew.writeInt(time);
        /*  781 */
        mplew.writeInt(0);

        /*  783 */
        return mplew.getPacket();

    }






    public static byte[] tripleSmega(List<String> message, boolean ear, int channel) {
        /*  790 */
        if (ServerConfig.DEBUG_MODE) {
            /*  791 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /*  793 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  795 */
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        /*  796 */
        mplew.write(10);
        /*  797 */
        if (message.get(0) != null) {
            /*  798 */
            mplew.writeMapleAsciiString(message.get(0));
            /*  799 */
            mplew.writeMapleAsciiString("");
            /*  800 */
            mplew.writeMapleAsciiString("");
            /*  801 */
            mplew.writeInt(0);
            /*  802 */
            mplew.writeInt(0);
            /*  803 */
            mplew.write(0);
            /*  804 */
            mplew.writeInt(0);

        }
        /*  806 */
        mplew.write(message.size());
        /*  807 */
        for (int i = 1; i < message.size(); i++) {
            /*  808 */
            if (message.get(i) != null) {
                /*  809 */
                mplew.writeMapleAsciiString(message.get(i));
                /*  810 */
                mplew.writeMapleAsciiString("");
                /*  811 */
                mplew.writeMapleAsciiString("");
                /*  812 */
                mplew.writeInt(0);
                /*  813 */
                mplew.writeInt(0);
                /*  814 */
                mplew.write(0);
                /*  815 */
                mplew.writeInt(0);

            }

        }
        /*  818 */
        mplew.write(channel - 1);
        /*  819 */
        mplew.write(ear ? 1 : 0);


        /*  822 */
        return mplew.getPacket();

    }






    public static byte[] getAvatarMega(MapleCharacter chr, int channel, int itemId, List<String> message, boolean ear) {
        /*  829 */
        if (ServerConfig.DEBUG_MODE) {
            /*  830 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /*  832 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  834 */
        mplew.writeShort(SendPacketOpcode.AVATAR_MEGA.getValue());
        /*  835 */
        mplew.writeInt(itemId);
        /*  836 */
        mplew.writeMapleAsciiString(chr.getName());
        /*  837 */
        for (int i = 0; i < 4; i++) {
            /*  838 */
            mplew.writeMapleAsciiString(message.get(i));

        }
        /*  840 */
        mplew.writeMapleAsciiString(chr.getName());
        /*  841 */
        StringBuilder sb = new StringBuilder();
        /*  842 */
        Iterator<String> iterator = message.iterator();
        /*  843 */
        while (iterator.hasNext()) {
            /*  844 */
            iterator.next();
            /*  845 */
            sb.append(sb).append("\n\r");

        }
        /*  847 */
        mplew.writeMapleAsciiString(sb.toString());
        /*  848 */
        mplew.writeInt(0);
        /*  849 */
        mplew.writeInt(0);
        /*  850 */
        mplew.write(0);
        /*  851 */
        mplew.writeInt(0);
        /*  852 */
        mplew.writeInt(channel - 1);
        /*  853 */
        mplew.write(ear ? 1 : 0);
        /*  854 */
        PacketHelper.addCharLook(mplew, chr, true, chr.isZeroSecondLook());
        /*  855 */
        mplew.write(0);
        /*  856 */
        return mplew.getPacket();

    }






    public static byte[] itemMegaphone(String msg, boolean whisper, int channel, Item item) {
        /*  863 */
        if (ServerConfig.DEBUG_MODE) {
            /*  864 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /*  866 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  868 */
        mplew.writeShort(SendPacketOpcode.SERVERMESSAGE.getValue());
        /*  869 */
        mplew.write(8);
        /*  870 */
        mplew.writeMapleAsciiString(msg);
        /*  871 */
        mplew.writeMapleAsciiString("");
        /*  872 */
        mplew.writeMapleAsciiString("");
        /*  873 */
        mplew.writeInt(0);
        /*  874 */
        mplew.writeInt(0);
        /*  875 */
        mplew.write(0);
        /*  876 */
        mplew.writeInt(0);
        /*  877 */
        mplew.write(channel - 1);
        /*  878 */
        mplew.write(whisper ? 1 : 0);
        /*  879 */
        mplew.writeInt(5076000);
        /*  880 */
        PacketHelper.addItemPosition(mplew, item, true, false);
        /*  881 */
        if (item != null) {
            /*  882 */
            PacketHelper.addItemInfo(mplew, item);
            /*  883 */
            mplew.writeMapleAsciiString(MapleItemInformationProvider.getInstance().getName(item.getItemId()));

        }
        /*  885 */
        mplew.writeInt(0);

        /*  887 */
        return mplew.getPacket();

    }



    public static byte[] getChatText(int cidfrom, int chatEmoticon, String text, String chrName, boolean whiteBG, int show) {
        /*  891 */
        return getChatText(false, chatEmoticon, cidfrom, text, chrName, whiteBG, show, null, "");

    }



    public static byte[] getChatText(int cidfrom, String text, String chrName, boolean whiteBG, int show) {
        /*  895 */
        return getChatText(false, 0, cidfrom, text, chrName, whiteBG, show, null, "");

    }




    public static byte[] getChatText(boolean itemChat, int chatEmoticon, int cidfrom, String text, String chrName, boolean whiteBG, int show, Item item, String itemName) {
        /*  900 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
















        /*  917 */
        mplew.writeShort(itemChat ? SendPacketOpcode.ITEM_CHATTEXT.getValue() : SendPacketOpcode.CHATTEXT.getValue());
        /*  918 */
        mplew.writeInt(cidfrom);
        /*  919 */
        mplew.write(whiteBG ? 1 : 0);
        /*  920 */
        mplew.writeMapleAsciiString(text);
        /*  921 */
        mplew.writeMapleAsciiString(chrName);
        /*  922 */
        mplew.writeMapleAsciiString(text);
        /*  923 */
        mplew.writeInt(0);
        /*  924 */
        mplew.writeInt(0);
        /*  925 */
        mplew.write(0);
        /*  926 */
        mplew.writeInt(cidfrom);
        /*  927 */
        mplew.writeShort(show);
        /*  928 */
        mplew.write(0);
        /*  929 */
        if (itemChat) {
            /*  930 */
            mplew.write(1);
            /*  931 */
            PacketHelper.addItemInfo(mplew, item);
            /*  932 */
            mplew.writeMapleAsciiString(itemName);

        }
        /*  934 */
        if (chatEmoticon > 0) {
            /*  935 */
            mplew.writeInt(chatEmoticon);

        }

        /*  938 */
        return mplew.getPacket();

    }



    public static byte[] GameMaster_Func(int value) {
        /*  942 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  944 */
        mplew.writeShort(SendPacketOpcode.GM_EFFECT.getValue());
        /*  945 */
        mplew.write(value);
        /*  946 */
        mplew.writeZeroBytes(17);

        /*  948 */
        return mplew.getPacket();

    }



    public static byte[] ShowAranCombo(int combo) {
        /*  952 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  954 */
        mplew.writeShort(SendPacketOpcode.ARAN_COMBO.getValue());
        /*  955 */
        mplew.writeInt(combo);
        /*  956 */
        mplew.write(0);

        /*  958 */
        return mplew.getPacket();

    }



    public static byte[] rechargeCombo(int value) {
        /*  962 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  964 */
        mplew.writeShort(SendPacketOpcode.ARAN_COMBO_RECHARGE.getValue());
        /*  965 */
        mplew.writeInt(value);

        /*  967 */
        return mplew.getPacket();

    }



    public static byte[] getPacketFromHexString(String hex) {
        /*  971 */
        return HexTool.getByteArrayFromHexString(hex);

    }



    public static byte[] showGainExpFromMonster(int gain, boolean white, Map<MapleExpStat, Integer> expStats) {
        /*  975 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /*  976 */
        if (ServerConfig.DEBUG_MODE) {
            /*  977 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /*  979 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /*  980 */
        mplew.write(ServerConstants.MapleStatusInfo.获得经验.getType());
        /*  981 */
        mplew.write(white ? 1 : 0);
        /*  982 */
        mplew.writeLong(gain);
        /*  983 */
        mplew.write(0);
        /*  984 */
        mplew.writeInt(0);
        /*  985 */
        long expMask = 0L;
        /*  986 */
        for (MapleExpStat statupdate : expStats.keySet()) {
            /*  987 */
            expMask |= statupdate.getValue();

        }
        /*  989 */
        mplew.writeLong(expMask);

        /*  991 */
        for (Map.Entry<MapleExpStat, Integer> statupdate : expStats.entrySet()) {
            /*  992 */
            Long value = Long.valueOf(((MapleExpStat) statupdate.getKey()).getValue());
            /*  993 */
            if (value.longValue() >= 1L) {
                /*  994 */
                if (value.longValue() == MapleExpStat.活动组队经验.getValue()) {
                    /*  995 */
                    mplew.write(((Integer) statupdate.getValue()).byteValue());
                    continue;

                }
                /*  997 */
                mplew.writeInt(((Integer) statupdate.getValue()).intValue());

            }

        }




        /* 1004 */
        return mplew.getPacket();

    }



    public static byte[] GainEXP_Monster(int gain, boolean white, int 组队经验, int 精灵祝福经验, int 道具佩戴经验, int 召回戒指经验, int Sidekick_Bonus_EXP, int 网吧特别经验, int 结婚奖励经验) {
        /* 1008 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 1009 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1010 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1012 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1013 */
        mplew.write(ServerConstants.MapleStatusInfo.获得经验.getType());
        /* 1014 */
        mplew.write(white ? 1 : 0);
        /* 1015 */
        mplew.writeInt(gain);
        /* 1016 */
        mplew.write(0);

        /* 1018 */
        mplew.writeInt(0);
        /* 1019 */
        mplew.writeShort(0);
        /* 1020 */
        mplew.writeInt(结婚奖励经验);
        /* 1021 */
        mplew.writeInt(召回戒指经验);
        /* 1022 */
        mplew.write(0);
        /* 1023 */
        mplew.writeInt(组队经验);
        /* 1024 */
        mplew.writeInt(道具佩戴经验);
        /* 1025 */
        mplew.writeInt(网吧特别经验);
        /* 1026 */
        mplew.writeInt(0);
        /* 1027 */
        mplew.writeInt(0);
        /* 1028 */
        mplew.writeInt(0);
        /* 1029 */
        mplew.writeInt(精灵祝福经验);
        /* 1030 */
        mplew.writeInt(0);
        /* 1031 */
        mplew.writeInt(0);
        /* 1032 */
        mplew.writeInt(0);
        /* 1033 */
        mplew.writeInt(0);
        /* 1034 */
        mplew.writeInt(0);
        /* 1035 */
        mplew.writeInt(0);
        /* 1036 */
        mplew.writeInt(0);

        /* 1038 */
        return mplew.getPacket();

    }



    public static byte[] GainEXP_Others(long gain, boolean inChat, boolean white) {
        /* 1042 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 1043 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1044 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1046 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1047 */
        mplew.write(ServerConstants.MapleStatusInfo.获得经验.getType());
        /* 1048 */
        mplew.write(white ? 1 : 0);
        /* 1049 */
        mplew.writeInt((int) gain);
        /* 1050 */
        mplew.write(inChat ? 1 : 0);
        /* 1051 */
        mplew.writeZeroBytes(32);
        /* 1052 */
        if (inChat) {
            /* 1053 */
            mplew.write(0);

        }

        /* 1056 */
        return mplew.getPacket();

    }









    public static byte[] getShowFameGain(int gain) {
        /* 1066 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1067 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1069 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1071 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1072 */
        mplew.write(ServerConstants.MapleStatusInfo.获得人气.getType());
        /* 1073 */
        mplew.writeInt(gain);

        /* 1075 */
        return mplew.getPacket();

    }










    public static byte[] showMesoGain(long gain, boolean inChat) {
        /* 1086 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1087 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1089 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1091 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1092 */
        if (!inChat) {
            /* 1093 */
            mplew.write(0);
            /* 1094 */
            mplew.writeInt(0);
            /* 1095 */
            mplew.write(0);
            /* 1096 */
            mplew.write(1);
            /* 1097 */
            mplew.write(0);
            /* 1098 */
            mplew.writeLong(gain);

        } else {
            /* 1100 */
            mplew.write(ServerConstants.MapleStatusInfo.获得金币.getType());
            /* 1101 */
            mplew.writeLong(gain);
            /* 1102 */
            mplew.writeInt(-1);

        }

        /* 1105 */
        return mplew.getPacket();

    }










    public static byte[] getShowItemGain(int itemId, short quantity) {
        /* 1116 */
        return getShowItemGain(itemId, quantity, false);

    }



    public static byte[] getShowItemGain(int itemId, short quantity, boolean inChat) {
        /* 1120 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1121 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }

        /* 1124 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1126 */
        if (inChat) {
            /* 1127 */
            mplew.writeShort(SendPacketOpcode.SHOW_SPECIAL_EFFECT.getValue());
            /* 1128 */
            mplew.write(EffectOpcode.UserEffect_Quest.getValue());
            /* 1129 */
            mplew.write(1);
            /* 1130 */
            mplew.writeInt(itemId);
            /* 1131 */
            mplew.writeInt(quantity);
            /* 1132 */
            return EffectPacket.getShowItemGain(Collections.singletonList(new Pair<>(Integer.valueOf(itemId), Integer.valueOf(quantity))));

        }
        /* 1134 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1135 */
        mplew.write(ServerConstants.MapleStatusInfo.获得道具.getType());
        /* 1136 */
        mplew.writeInt(0);
        /* 1137 */
        mplew.write(0);
        /* 1138 */
        mplew.write(0);
        /* 1139 */
        mplew.writeInt(itemId);
        /* 1140 */
        mplew.writeInt(quantity);


        /* 1143 */
        return mplew.getPacket();

    }









    public static byte[] showItemExpired(int itemId) {
        /* 1153 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1154 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1156 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1158 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1159 */
        mplew.write(ServerConstants.MapleStatusInfo.非商城道具到期.getType());
        /* 1160 */
        mplew.write(1);
        /* 1161 */
        mplew.writeInt(itemId);

        /* 1163 */
        return mplew.getPacket();

    }









    public static byte[] showSkillExpired(Map<Integer, SkillEntry> update) {
        /* 1173 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1174 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1176 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1178 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1179 */
        mplew.write(ServerConstants.MapleStatusInfo.技能到期.getType());
        /* 1180 */
        mplew.write(update.size());
        /* 1181 */
        for (Map.Entry<Integer, SkillEntry> skills : update.entrySet()) {
            /* 1182 */
            mplew.writeInt(((Integer) skills.getKey()).intValue());

        }

        /* 1185 */
        return mplew.getPacket();

    }









    public static byte[] showCashItemExpired(int itemId) {
        /* 1195 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1196 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1198 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1200 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1201 */
        mplew.write(ServerConstants.MapleStatusInfo.商城道具到期.getType());
        /* 1202 */
        mplew.writeInt(itemId);

        /* 1204 */
        return mplew.getPacket();

    }



    private static void addPlayerStats(MapleCharacter chr, MaplePacketLittleEndianWriter mplew) {
        /* 1208 */
        List<MapleBuffStat> buffStats = MapleBuffStat.getSpawnList(chr);
        int i;
        /* 1209 */
        for (i = 33; i > 0; i--) {
            /* 1210 */
            int value = 0;

            /* 1212 */
            for (MapleBuffStat buffstat : buffStats) {
                /* 1213 */
                if (buffstat.getPosition() == i) {
                    /* 1214 */
                    value += buffstat.getValue(true, true);

                }

            }
            /* 1217 */
            mplew.writeInt(value);

        }

        /* 1220 */
        for (i = 0; i < 33; i++) {
            /* 1221 */
            for (MapleBuffStat buffstat : buffStats) {
                /* 1222 */
                if (buffstat.getPosition() == i) {
                    /* 1223 */
                    buffstat.getSerializeSpawn().Serialize(mplew, chr);

                }

            }

        }
        /* 1227 */
        mplew.writeInt(-1);

    }



    public static byte[] spawnPlayerMapobject(MapleCharacter chr) {
        /* 1231 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1233 */
        mplew.writeShort(SendPacketOpcode.SPAWN_PLAYER.getValue());
        /* 1234 */
        mplew.writeInt(chr.getId());
        /* 1235 */
        mplew.writeInt(chr.getLevel());
        /* 1236 */
        mplew.writeMapleAsciiString(chr.getName());
        /* 1237 */
        MapleQuestStatus ultExplorer = chr.getQuestNoAdd(MapleQuest.getInstance(111111));
        /* 1238 */
        if (ultExplorer != null && ultExplorer.getCustomData() != null) {
            /* 1239 */
            mplew.writeMapleAsciiString(ultExplorer.getCustomData());

        } else {
            /* 1241 */
            mplew.writeMapleAsciiString("");

        }
        /* 1243 */
        if (chr.getGuildId() <= 0) {
            /* 1244 */
            mplew.writeLong(0L);

        } else {
            /* 1246 */
            MapleGuild guild = WorldGuildService.getInstance().getGuild(chr.getGuildId());
            /* 1247 */
            if (guild != null) {
                /* 1248 */
                mplew.writeMapleAsciiString(guild.getName());
                /* 1249 */
                mplew.writeShort(guild.getLogoBG());
                /* 1250 */
                mplew.write(guild.getLogoBGColor());
                /* 1251 */
                mplew.writeShort(guild.getLogo());
                /* 1252 */
                mplew.write(guild.getLogoColor());

            } else {
                /* 1254 */
                mplew.writeLong(0L);

            }

        }

        /* 1258 */
        mplew.write(chr.getGender());

        /* 1260 */
        mplew.writeInt(0);
        /* 1261 */
        mplew.writeInt(0);
        /* 1262 */
        mplew.writeInt(0);

        /* 1264 */
        mplew.writeZeroBytes(5);
        /* 1265 */
        mplew.writeLong(0L);
        /* 1266 */
        Map<MapleBuffStat, Integer> statups = new HashMap<>(MapleBuffStat.getSpawnList());

        /* 1268 */
        chr.getAllEffects().stream().filter(pair -> SkillConstants.isShowForgenBuff(pair.getLeft())).forEach(pair -> statups.put(pair.getLeft(), pair.getRight().value));

        /* 1270 */
        BuffPacket.writeForeignBuff(mplew, chr, statups, true);


        /* 1273 */
        chr.writeJobData(mplew);
        /* 1274 */
        mplew.writeInt(0);
        /* 1275 */
        mplew.writeInt(0);
        /* 1276 */
        PacketHelper.addCharLook(mplew, chr, true, chr.isZeroSecondLook());
        /* 1277 */
        if (JobConstants.is神之子(chr.getJob())) {
            /* 1278 */
            PacketHelper.addCharLook(mplew, chr, true, !chr.isZeroSecondLook());

        }
        /* 1280 */
        mplew.writeHexString("00 00 00 00 FF 00 00 00 00 FF");

        /* 1282 */
        mplew.writeLong(0L);
        /* 1283 */
        int buffSrc = chr.getBuffSource(MapleBuffStat.骑兽技能);
        /* 1284 */
        if (chr.getBuffedValue(MapleBuffStat.飞翔) != null && buffSrc > 0) {
            /* 1285 */
            addMountId(mplew, chr, buffSrc);
            /* 1286 */
            mplew.writeInt(chr.getId());

        } else {
            /* 1288 */
            mplew.writeLong(0L);

        }
        /* 1290 */
        mplew.writeInt(0);
        /* 1291 */
        mplew.writeInt(Math.min(250, chr.getInventory(MapleInventoryType.CASH).countById(5110000)));
        /* 1292 */
        mplew.writeInt(chr.getItemEffect());
        /* 1293 */
        mplew.writeInt(chr.getItemEffectType());
        /* 1294 */
        mplew.writeInt(chr.getTitleEffect());
        /* 1295 */
        mplew.writeBool(false);
        /* 1296 */
        mplew.writeInt(chr.getDamageSkin());
        /* 1297 */
        mplew.writeInt(0);
        /* 1298 */
        mplew.writeMapleAsciiString("");
        /* 1299 */
        mplew.writeMapleAsciiString("");
        /* 1300 */
        mplew.writeInt(0);
        /* 1301 */
        mplew.writeInt(0);
        /* 1302 */
        mplew.writeInt(0);
        /* 1303 */
        mplew.write(1);
        /* 1304 */
        mplew.writeInt(chr.getStat().getEfftype());
        /* 1305 */
        mplew.writeMapleAsciiString("");
        /* 1306 */
        mplew.writeMapleAsciiString("");

        /* 1308 */
        mplew.writeInt(-1);
        /* 1309 */
        mplew.writeShort(-1);
        /* 1310 */
        boolean Chair = (ItemConstants.getInventoryType(chr.getChair()) == MapleInventoryType.SETUP);























        /* 1334 */
        mplew.writeInt(Chair ? chr.getChair() : 0);
        /* 1335 */
        mplew.writeInt(Chair ? chr.getChairMode() : 0);
        /* 1336 */
        for (int i = 0; i < (chr.getChairMask()).length; i++) {
            /* 1337 */
            mplew.write(Chair ? chr.getChairMask()[i] : 0);

        }
        /* 1339 */
        mplew.write(0);

        /* 1341 */
        mplew.writePos(chr.getTruePosition());
        /* 1342 */
        mplew.write(chr.getStance());
        /* 1343 */
        mplew.writeShort(chr.getFH());

        /* 1345 */
        mplew.write(Chair ? 1 : 0);
        /* 1346 */
        if (Chair) {
            /* 1347 */
            ChairInfo(mplew, chr);

        }


        /* 1351 */
        MaplePet[] pet = chr.getSpawnPets();
        /* 1352 */
        for (int j = 0; j < 3; j++) {
            /* 1353 */
            if (pet[j] != null && pet[j].getSummoned()) {
                /* 1354 */
                PetPacket.addPetInfo(mplew, chr, pet[j], true);

            }

        }
        /* 1357 */
        mplew.write(0);
        /* 1358 */
        mplew.write(0);

        /* 1360 */
        mplew.writeInt((chr.getMount() != null) ? chr.getMount().getLevel() : 1);
        /* 1361 */
        mplew.writeInt((chr.getMount() != null) ? chr.getMount().getExp() : 0);
        /* 1362 */
        mplew.writeInt((chr.getMount() != null) ? chr.getMount().getFatigue() : 0);
        /* 1363 */
        mplew.write(0);

        /* 1365 */
        PacketHelper.addAnnounceBox(mplew, chr);

        /* 1367 */
        mplew.write((chr.getChalkboard() != null && chr.getChalkboard().length() > 0) ? 1 : 0);
        /* 1368 */
        if (chr.getChalkboard() != null && chr.getChalkboard().length() > 0) {
            /* 1369 */
            mplew.writeMapleAsciiString(chr.getChalkboard());

        }

        /* 1372 */
        Triple<List<MapleRing>, List<MapleRing>, List<MapleRing>> rings = chr.getRings(true);
        /* 1373 */
        addRingInfo(mplew, rings.getLeft());
        /* 1374 */
        addRingInfo(mplew, rings.getMid());
        /* 1375 */
        addMRingInfo(mplew, rings.getRight(), chr);












        /* 1388 */
        mplew.write(1);
        /* 1389 */
        mplew.writeInt(0);
        /* 1390 */
        mplew.writeShort(0);
        /* 1391 */
        mplew.writeInt(chr.getMount().getItemId());
        /* 1392 */
        if (JobConstants.is狂龙战士(chr.getJob())) {
            /* 1393 */
            String string2 = chr.getOneInfo(12860, "extern");
            /* 1394 */
            mplew.writeInt((string2 == null) ? 0 : Integer.parseInt(string2));
            /* 1395 */
            string2 = chr.getOneInfo(12860, "inner");
            /* 1396 */
            mplew.writeInt((string2 == null) ? 0 : Integer.parseInt(string2));
            /* 1397 */
            string2 = chr.getOneInfo(12860, "premium");
            /* 1398 */
            mplew.write((string2 == null) ? 0 : Integer.parseInt(string2));

        }
        /* 1400 */
        mplew.writeInt(0);

        /* 1402 */
        mplew.writeInt(-1);
        /* 1403 */
        mplew.write(-1);
        /* 1404 */
        mplew.writeInt(0);
        /* 1405 */
        mplew.write(1);
        /* 1406 */
        mplew.writeInt(0);
        /* 1407 */
        mplew.write(0);
        /* 1408 */
        mplew.write(0);
        /* 1409 */
        mplew.writeInt(0);
        /* 1410 */
        mplew.writeInt(0);
        /* 1411 */
        mplew.write(0);
        /* 1412 */
        mplew.writeInt(0);
        /* 1413 */
        mplew.write((JobConstants.is超能力者(chr.getJob()) && chr.getSpecialStat().getPP() > 0 && chr.getBuffedValue(MapleBuffStat.心魂本能) != null) ? 1 : 0);
        /* 1414 */
        mplew.write(1);
        /* 1415 */
        mplew.write(1);
        /* 1416 */
        mplew.writeShort(0);

        /* 1418 */
        mplew.writeInt(0);
        /* 1419 */
        mplew.write(0);
        /* 1420 */
        mplew.writeInt(0);
        /* 1421 */
        mplew.writeInt(chr.getSkillSkin().size());
        /* 1422 */
        chr.getSkillSkin().forEach((key, value) -> {

            mplew.writeInt(key.intValue());

            mplew.writeInt(value.intValue());

        });
        /* 1426 */
        mplew.writeInt(0);
        /* 1427 */
        mplew.writeInt(0);
        /* 1428 */
        mplew.writeInt(0);
        /* 1429 */
        mplew.writeInt(0);
        /* 1430 */
        mplew.writeMapleAsciiString(chr.getId() + "");






























        /* 1461 */
        FamiliarPacket.SpawnFamiliarDate(mplew, chr);

        /* 1463 */
        if (chr.getMapId() / 100000 == 9600) {
            /* 1464 */
            mplew.write(chr.inPVP() ? Integer.valueOf(chr.getEventInstance().getProperty("type")).intValue() : 0);
            /* 1465 */
            if (chr.inPVP() && Integer.valueOf(chr.getEventInstance().getProperty("type")).intValue() > 0) {
                /* 1466 */
                mplew.write(chr.getTeam() + 1);

            }
            /* 1468 */
        } else if (chr.getMapId() / 100000 == 9800 || chr.getMapId() == 109080000) {
            /* 1469 */
            mplew.write((chr.getCarnivalParty() != null) ? chr.getCarnivalParty().getTeam() : 0);

        }
        /* 1471 */
        return mplew.getPacket();

    }



    public static void addMountId(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, int buffSrc) {
        /* 1475 */
        Item c_mount = chr.getInventory(MapleInventoryType.EQUIPPED).getItem((short) -123);
        /* 1476 */
        Item mount = chr.getInventory(MapleInventoryType.EQUIPPED).getItem((short) -18);
        /* 1477 */
        int mountId = GameConstants.getMountItem(buffSrc, chr);
        /* 1478 */
        if (mountId == 0 && c_mount != null && chr.getInventory(MapleInventoryType.EQUIPPED).getItem((short) -124) != null) {
            /* 1479 */
            mplew.writeInt(c_mount.getItemId());
            /* 1480 */
        } else if (mountId == 0 && mount != null && chr.getInventory(MapleInventoryType.EQUIPPED).getItem((short) -19) != null) {
            /* 1481 */
            mplew.writeInt(mount.getItemId());

        } else {
            /* 1483 */
            mplew.writeInt(mountId);

        }

    }



    public static byte[] removePlayerFromMap(int chrId) {
        /* 1488 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1490 */
        mplew.writeShort(SendPacketOpcode.REMOVE_PLAYER_FROM_MAP.getValue());
        /* 1491 */
        mplew.writeInt(chrId);

        /* 1493 */
        return mplew.getPacket();

    }



    public static byte[] facialExpression(MapleCharacter from, int expression) {
        /* 1497 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1498 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 1500 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1502 */
        mplew.writeShort(SendPacketOpcode.FACIAL_EXPRESSION.getValue());
        /* 1503 */
        mplew.writeInt(from.getId());
        /* 1504 */
        mplew.writeInt(expression);
        /* 1505 */
        mplew.writeInt(-1);
        /* 1506 */
        mplew.write(0);

        /* 1508 */
        return mplew.getPacket();

    }
















    public static byte[] movePlayer(int cid, int v169, int tEncodedGatherDuration, Point startPos, Point velPos, List<LifeMovementFragment> moves) {
        /* 1525 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1527 */
        mplew.writeShort(SendPacketOpcode.MOVE_PLAYER.getValue());
        /* 1528 */
        mplew.writeInt(cid);
        /* 1529 */
        PacketHelper.serializeMovementList(mplew, v169, tEncodedGatherDuration, startPos, velPos, moves);

        /* 1531 */
        return mplew.getPacket();

    }



    public static byte[] closeRangeAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo, boolean energy, boolean hasMoonBuff) {
        /* 1535 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1537 */
        mplew.writeShort(energy ? SendPacketOpcode.ENERGY_ATTACK.getValue() : SendPacketOpcode.CLOSE_RANGE_ATTACK.getValue());
        /* 1538 */
        addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, hasMoonBuff, false);

        /* 1540 */
        return mplew.getPacket();

    }



    public static byte[] rangedAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo) {
        /* 1544 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1545 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 1547 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1549 */
        mplew.writeShort(SendPacketOpcode.RANGED_ATTACK.getValue());
        /* 1550 */
        addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, false, true);
        /* 1551 */
        if (JobConstants.is神之子(chr.getJob()) && attackInfo.skillId >= 100000000) {
            /* 1552 */
            mplew.writeInt(attackInfo.position.x);
            /* 1553 */
            mplew.writeInt(attackInfo.position.y);
            /* 1554 */
        } else if (attackInfo.skillposition != null) {
            /* 1555 */
            if (attackInfo.skillId == 13121052) {
                /* 1556 */
                mplew.writeLong(0L);

            } else {
                /* 1558 */
                mplew.writePos(attackInfo.skillposition);

            }
            /* 1560 */
        } else if (attackInfo.skillId == 112110003) {
            /* 1561 */
            mplew.writeInt(0);

        }

        /* 1564 */
        return mplew.getPacket();

    }



    public static byte[] magicAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo) {
        /* 1568 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1570 */
        mplew.writeShort(SendPacketOpcode.MAGIC_ATTACK.getValue());
        /* 1571 */
        addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, false, false);

        /* 1573 */
        return mplew.getPacket();

    }



    public static void addAttackBody(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, int skilllevel, int itemId, AttackInfo ai, boolean hasMoonBuff, boolean b3) {
        /* 1577 */
        int skillId = ai.skillId;
        /* 1578 */
        mplew.writeInt(chr.getId());
        /* 1579 */
        mplew.write(0);
        /* 1580 */
        mplew.write(ai.numAttackedAndDamage);
        /* 1581 */
        mplew.writeInt(chr.getLevel());
        /* 1582 */
        mplew.writeInt((skilllevel > 0 && skillId > 0) ? skilllevel : 0);
        /* 1583 */
        if (skilllevel > 0 && skillId > 0) {
            /* 1584 */
            mplew.writeInt(skillId);

        }
        /* 1586 */
        if (JobConstants.is神之子(chr.getJob()) && skillId >= 100000000) {
            /* 1587 */
            mplew.write(0);

        }
        /* 1589 */
        if (b3 && nw(skillId)) {
            /* 1590 */
            mplew.writeInt(0);

        }
        /* 1592 */
        if (skillId == 80001850 || skillId == 42001000 || (skillId > 42001004 && skillId <= 42001006)) {
            /* 1593 */
            mplew.writeInt(0);

        }
        /* 1595 */
        if (hasMoonBuff) {
            /* 1596 */
            mplew.write(0);
            /* 1597 */
            mplew.write(2);
            /* 1598 */
            mplew.writeInt(11101022);
            /* 1599 */
            mplew.writeShort(20);

        }
        /* 1601 */
        mplew.write(b3 ? 8 : ny(skillId));
        /* 1602 */
        mplew.write(0);
        /* 1603 */
        mplew.writeInt(0);
        /* 1604 */
        mplew.writeInt(0);
        /* 1605 */
        mplew.write(ai.display);
        /* 1606 */
        mplew.write(ai.direction);
        /* 1607 */
        mplew.write(-1);
        /* 1608 */
        mplew.writeShort(0);
        /* 1609 */
        mplew.writeShort(0);
        /* 1610 */
        mplew.write(0);
        /* 1611 */
        mplew.write(0);
        /* 1612 */
        mplew.write(ai.speed);
        /* 1613 */
        mplew.write(chr.getStat().passive_mastery());
        /* 1614 */
        mplew.writeInt(itemId);
        /* 1615 */
        for (AttackPair oned : ai.allDamage) {
            /* 1616 */
            if (oned.attack != null) {
                /* 1617 */
                mplew.writeInt(oned.objectid);
                /* 1618 */
                mplew.write(ai.ef);
                /* 1619 */
                mplew.write(0);
                /* 1620 */
                mplew.write(0);
                /* 1621 */
                mplew.writeShort(0);
                /* 1622 */
                mplew.writeInt(0);
                /* 1623 */
                mplew.writeInt(0);
                /* 1624 */
                if (skillId == 4211006 || skillId == 42111002 || skillId == 80011050) {
                    /* 1625 */
                    mplew.write(oned.attack.size());

                }
                /* 1627 */
                for (Pair<Long, Boolean> eachd : oned.attack) {
                    /* 1628 */
                    if (((Boolean) eachd.right).booleanValue()) {
                        /* 1629 */
                        mplew.writeLong(((Long) eachd.left).longValue() + Long.MIN_VALUE);
                        continue;

                    }
                    /* 1631 */
                    mplew.writeLong(((Long) eachd.left).longValue());

                }

                /* 1634 */
                if (oned.ksPsychicObjectId >= 0) {
                    /* 1635 */
                    mplew.writeInt(oned.ksPsychicObjectId);

                }
                /* 1637 */
                if (skillId == 37111005) {
                    /* 1638 */
                    mplew.write(0);

                }

            }

        }








        /* 1650 */
        if (skillId == 2321001 || skillId == 2221052 || skillId == 11121052 || skillId == 12121054) {
            /* 1651 */
            mplew.writeInt(ai.charge);
            /* 1652 */
        } else if (skillId == 152110004 || skillId == 152120016 || skillId == 400031016 || skillId == 400041024 || skillId == 400041019 || skillId == 80002212 || skillId == 80001762 || skillId == 1011000102 || skillId == 101000202 || skillId == 4221052 || skillId == 65121052 || skillId == 80001431 || skillId == 100001283 || skillId == 21121057 || skillId == 13121052 || skillId == 14121052 || skillId == 15121052) {
            /* 1653 */
            mplew.writeInt(0);
            /* 1654 */
            mplew.writeInt(0);

        }
        /* 1656 */
        if (skillId == 13111020 || skillId == 112111016) {
            /* 1657 */
            mplew.writeShort(0);
            /* 1658 */
            mplew.writeShort(0);

        }
        /* 1660 */
        if (skillId == 51121009) {
            /* 1661 */
            mplew.write(0);
            /* 1662 */
        } else if (skillId == 112110003) {
            /* 1663 */
            mplew.writeInt(0);
            /* 1664 */
        } else if (skillId == 42100007) {
            /* 1665 */
            mplew.writeShort(0);
            /* 1666 */
            mplew.write(0);

        }
        /* 1668 */
        if (skillId == 21120019 || skillId == 37121052 || skillId == 11121014 || skillId == 5101004 || (skillId >= 400041002 && skillId <= 400041005) || skillId == 400041002 || skillId == 400041003 || skillId == 400041004 || skillId == 400041005 || skillId == 3321039 || skillId == 400031035 || skillId == 3321038 || skillId == 3321005 || skillId == 3311011 || skillId == 3311013 || skillId == 3301004 || skillId == 155101104 || skillId == 400051042 || skillId == 400021077 || skillId == 164121044 || skillId == 151101001 || skillId == 151101003) {





            /* 1674 */
            mplew.write(0);
            /* 1675 */
            mplew.writeInt(0);
            /* 1676 */
            mplew.writeInt(0);

        }
        /* 1678 */
        if (skillId == 400020009 || skillId == 64111012 || skillId == 400020010 || skillId == 400020011 || skillId == 400021029 || skillId == 400021053) {
            /* 1679 */
            mplew.writeShort(0);
            /* 1680 */
            mplew.writeShort(0);

        }
        /* 1682 */
        if (nv(skillId) || skillId == 3301008) {
            /* 1683 */
            mplew.writeInt(0);
            /* 1684 */
            mplew.write(0);

        }

    }





    public static boolean nv(int skillid) {
        /* 1691 */
        if (skillid <= 400021048) {
            /* 1692 */
            if (skillid < 400021047) {
                /* 1693 */
                if (skillid > 400011004) {
                    /* 1694 */
                    switch (skillid) {

                        case 400021004:

                        case 400021009:

                        case 400021010:

                        case 400021011:

                        case 400021028:
                            /* 1700 */
                            return true;

                    }

                    /* 1703 */
                    return false;

                }

                /* 1706 */
                if (skillid != 400011004 && skillid != 152001002 && skillid != 152120003) {
                    /* 1707 */
                    return (skillid == 152121004);

                }

            }
            /* 1710 */
            return true;

        }
        /* 1712 */
        if (skillid > 400041034) {
            /* 1713 */
            return (skillid == 400051003 || skillid == 400051008 || skillid == 400051016);

        }
        /* 1715 */
        if (skillid == 400041034) {
            /* 1716 */
            return true;

        }
        /* 1718 */
        if (skillid <= 400041018) {
            /* 1719 */
            return (skillid >= 400041016 || (skillid >= 400021064 && skillid <= 400021065));

        }
        /* 1721 */
        return (skillid == 400041020);

    }



    public static boolean nw(int n2) {
        /* 1725 */
        switch (n2) {

            case 1120017:

            case 1121008:

            case 1221009:

            case 1221011:

            case 2121006:

            case 2221006:

            case 3121015:

            case 3121020:

            case 3221017:

            case 4121013:

            case 4221007:

            case 4331000:

            case 4341009:

            case 5121007:

            case 5121016:

            case 5121017:

            case 5121020:

            case 5221016:

            case 5321000:

            case 5321012:

            case 5721007:

            case 5721064:

            case 11121103:

            case 11121203:

            case 12100028:

            case 12110028:

            case 12120010:

            case 12120011:

            case 13121002:

            case 14121002:

            case 15111022:

            case 15120003:

            case 15121002:

            case 21110020:

            case 21111021:

            case 21120006:

            case 21120022:

            case 22140023:

            case 25121005:

            case 31111005:

            case 31121001:

            case 32111003:

            case 35121016:

            case 37110002:

            case 37120001:

            case 41121001:

            case 41121018:

            case 41121021:

            case 42121000:

            case 51121007:

            case 51121008:

            case 112101009:

            case 112111004:

            case 112120000:

            case 112120001:

            case 112120002:

            case 112120003:

            case 112120050:
                /* 1784 */
                return true;

        }

        /* 1787 */
        return false;

    }



    public static int ny(int n2) {
        /* 1791 */
        switch (n2) {

            case 2121054:

            case 31121005:

            case 42121054:

            case 65121052:
                /* 1796 */
                return 4;

        }

        /* 1799 */
        return 0;

    }






    public static byte[] showSpecialAttack(int chrId, int tickCount, int pot_x, int pot_y, int display, int skillId, int skilllevel, boolean isLeft, int speed) {
        /* 1806 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1807 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 1809 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1811 */
        mplew.writeShort(SendPacketOpcode.SHOW_SPECIAL_ATTACK.getValue());
        /* 1812 */
        mplew.writeInt(chrId);
        /* 1813 */
        mplew.writeInt(tickCount);
        /* 1814 */
        mplew.writeInt(pot_x);
        /* 1815 */
        mplew.writeInt(pot_y);
        /* 1816 */
        mplew.writeInt(display);
        /* 1817 */
        mplew.writeInt(skillId);
        /* 1818 */
        mplew.writeInt(0);
        /* 1819 */
        mplew.writeInt(skilllevel);
        /* 1820 */
        mplew.write(isLeft ? 1 : 0);
        /* 1821 */
        mplew.writeInt(speed);

        /* 1823 */
        return mplew.getPacket();

    }






    public static byte[] updateCharLook(MapleCharacter chr) {
        /* 1830 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1831 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 1833 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1835 */
        mplew.writeShort(SendPacketOpcode.UPDATE_CHAR_LOOK.getValue());
        /* 1836 */
        mplew.writeInt(chr.getId());
        /* 1837 */
        mplew.write(1);
        /* 1838 */
        PacketHelper.addCharLook(mplew, chr, false, chr.isZeroSecondLook());
        /* 1839 */
        mplew.writeHexString("00 00 00 00 FF 00 00 00 00 FF");
        /* 1840 */
        Triple<List<MapleRing>, List<MapleRing>, List<MapleRing>> rings = chr.getRings(false);
        /* 1841 */
        addRingInfo(mplew, rings.getLeft());
        /* 1842 */
        addRingInfo(mplew, rings.getMid());
        /* 1843 */
        addMRingInfo(mplew, rings.getRight(), chr);
        /* 1844 */
        mplew.writeInt(0);
        /* 1845 */
        mplew.writeLong(0L);

        /* 1847 */
        return mplew.getPacket();

    }






    public static byte[] updateZeroLook(MapleCharacter chr) {
        /* 1854 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1855 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 1857 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1859 */
        mplew.writeShort(SendPacketOpcode.UPDATE_ZERO_LOOK.getValue());
        /* 1860 */
        mplew.writeInt(chr.getId());
        /* 1861 */
        PacketHelper.addCharLook(mplew, chr, false, chr.isZeroSecondLook());
        /* 1862 */
        mplew.writeHexString("00 00 00 00 FF 00 00 00 00 FF");

        /* 1864 */
        return mplew.getPacket();

    }



    public static byte[] removeZeroFromMap(int chrId) {
        /* 1868 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1869 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 1871 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1873 */
        mplew.writeShort(SendPacketOpcode.REMOVE_ZERO_FROM_MAP.getValue());
        /* 1874 */
        mplew.writeInt(chrId);

        /* 1876 */
        return mplew.getPacket();

    }



    public static void addRingInfo(MaplePacketLittleEndianWriter mplew, List<MapleRing> rings) {
        /* 1880 */
        mplew.writeBool(!rings.isEmpty());
        /* 1881 */
        if (!rings.isEmpty()) {
            /* 1882 */
            mplew.writeInt(rings.size());
            /* 1883 */
            for (MapleRing ring : rings) {
                /* 1884 */
                mplew.writeLong(ring.getRingId());
                /* 1885 */
                mplew.writeLong(ring.getPartnerRingId());
                /* 1886 */
                mplew.writeInt(ring.getItemId());

            }

        }

    }






    public static void addMRingInfo(MaplePacketLittleEndianWriter mplew, List<MapleRing> rings, MapleCharacter chr) {
        /* 1895 */
        mplew.write(rings.size());
        /* 1896 */
        for (MapleRing ring : rings) {
            /* 1897 */
            mplew.writeInt(chr.getId());
            /* 1898 */
            mplew.writeInt(ring.getPartnerChrId());
            /* 1899 */
            mplew.writeInt(ring.getItemId());

        }

    }



    public static byte[] damagePlayer(int chrId, int type, int damage, int monsteridfrom, byte direction, int skillid, int pDMG, boolean pPhysical, int pID, byte pType, Point pPos, byte offset, int offset_d, int fake) {
        /* 1904 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1906 */
        mplew.writeShort(SendPacketOpcode.DAMAGE_PLAYER.getValue());
        /* 1907 */
        mplew.writeInt(chrId);
        /* 1908 */
        mplew.write(type);
        /* 1909 */
        mplew.writeInt(damage);
        /* 1910 */
        mplew.writeShort(0);
        /* 1911 */
        if (type >= -1) {
            /* 1912 */
            mplew.writeInt(monsteridfrom);
            /* 1913 */
            mplew.write(direction);
            /* 1914 */
            mplew.writeInt(pID);
            /* 1915 */
            mplew.writeInt(skillid);
            /* 1916 */
            mplew.writeInt(pDMG);
            /* 1917 */
            mplew.write(0);
            /* 1918 */
            if (pDMG > 0) {
                /* 1919 */
                mplew.write(pPhysical ? 1 : 0);
                /* 1920 */
                mplew.writeInt(pID);
                /* 1921 */
                mplew.write(pType);
                /* 1922 */
                mplew.writePos(pPos);

            }
            /* 1924 */
        } else if (type == -8) {
            /* 1925 */
            mplew.writeInt(1);
            /* 1926 */
            mplew.writeInt(0);
            /* 1927 */
            mplew.writeInt(0);

        }
        /* 1929 */
        mplew.write(offset);
        /* 1930 */
        if (offset == 1) {
            /* 1931 */
            mplew.writeInt(offset_d);

        }
        /* 1933 */
        mplew.writeInt(damage);
        /* 1934 */
        if (damage <= 0 || fake > 0) {
            /* 1935 */
            mplew.writeInt(fake);

        }
        /* 1937 */
        return mplew.getPacket();

    }



    public static byte[] damagePlayer(int chrId, int type, int monsteridfrom, int damage) {
        /* 1941 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1943 */
        mplew.writeShort(SendPacketOpcode.DAMAGE_PLAYER.getValue());
        /* 1944 */
        mplew.writeInt(chrId);
        /* 1945 */
        mplew.write(type);
        /* 1946 */
        mplew.writeInt(damage);
        /* 1947 */
        mplew.write(0);
        /* 1948 */
        mplew.writeInt(monsteridfrom);
        /* 1949 */
        mplew.write(0);
        /* 1950 */
        mplew.writeInt(0);
        /* 1951 */
        mplew.writeInt(0);
        /* 1952 */
        mplew.writeInt(0);
        /* 1953 */
        mplew.write(0);
        /* 1954 */
        mplew.write(0);
        /* 1955 */
        mplew.writeInt(damage);

        /* 1957 */
        return mplew.getPacket();

    }









    public static byte[] updateQuest(MapleQuestStatus quest) {
        /* 1967 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1968 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1970 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 1972 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 1973 */
        mplew.write(ServerConstants.MapleStatusInfo.更新任务状态.getType());
        /* 1974 */
        mplew.writeInt(quest.getQuest().getId());
        /* 1975 */
        mplew.write(quest.getStatus());
        /* 1976 */
        switch (quest.getStatus()) {

            case 0:
                /* 1978 */
                mplew.writeZeroBytes(10);

                break;

            case 1:
                /* 1981 */
                mplew.writeMapleAsciiString((quest.getCustomData() != null) ? quest.getCustomData() : "");

                break;

            case 2:
                /* 1984 */
                mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));

                break;

        }

        /* 1988 */
        return mplew.getPacket();

    }






    public static byte[] updateInfoQuest(int quest, String data) {
        /* 1995 */
        if (ServerConfig.DEBUG_MODE) {
            /* 1996 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 1998 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2000 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 2001 */
        mplew.write((quest == 7) ? ServerConstants.MapleStatusInfo.更新任务信息2.getType() : ServerConstants.MapleStatusInfo.更新任务信息.getType());
        /* 2002 */
        mplew.writeInt(quest);
        /* 2003 */
        mplew.writeMapleAsciiString(data);

        /* 2005 */
        return mplew.getPacket();

    }












    public static byte[] updateQuestInfo(int quest, int npc, int nextquest, boolean updata) {
        /* 2018 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2019 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2021 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2023 */
        mplew.writeShort(SendPacketOpcode.UPDATE_QUEST_INFO.getValue());
        /* 2024 */
        mplew.write(11);
        /* 2025 */
        mplew.writeInt(quest);
        /* 2026 */
        mplew.writeInt(npc);
        /* 2027 */
        mplew.writeInt(nextquest);
        /* 2028 */
        mplew.writeBool(updata);

        /* 2030 */
        return mplew.getPacket();

    }



    public static byte[] startQuestTimeLimit(int n2, int n3) {
        /* 2034 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2035 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2037 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2039 */
        mplew.writeShort(SendPacketOpcode.UPDATE_QUEST_INFO.getValue());
        /* 2040 */
        mplew.write(7);
        /* 2041 */
        mplew.writeShort(1);
        /* 2042 */
        mplew.writeInt(n2);
        /* 2043 */
        mplew.writeInt(n3);

        /* 2045 */
        return mplew.getPacket();

    }



    public static byte[] stopQuestTimeLimit(int n2) {
        /* 2049 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2050 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2052 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2054 */
        mplew.writeShort(SendPacketOpcode.UPDATE_QUEST_INFO.getValue());
        /* 2055 */
        mplew.write(19);
        /* 2056 */
        mplew.writeInt(n2);

        /* 2058 */
        return mplew.getPacket();

    }






    public static byte[] updateMedalQuestInfo(byte op, int itemId) {
        /* 2065 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2066 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2068 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2070 */
        mplew.writeShort(SendPacketOpcode.REISSUE_MEDAL.getValue());




        /* 2075 */
        mplew.write(op);
        /* 2076 */
        mplew.writeInt(itemId);

        /* 2078 */
        return mplew.getPacket();

    }



    public static byte[] charInfo(MapleCharacter chr, boolean isSelf) {
        /* 2082 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2084 */
        mplew.writeShort(SendPacketOpcode.CHAR_INFO.getValue());
        /* 2085 */
        mplew.writeInt(chr.getId());

        /* 2087 */
        mplew.writeInt(chr.getLevel());
        /* 2088 */
        chr.writeJobData(mplew);
        /* 2089 */
        mplew.write((chr.getStat()).pvpRank);
        /* 2090 */
        mplew.writeInt(chr.getFame());
        /* 2091 */
        MapleRing mRing = chr.getMarriageRing();
        /* 2092 */
        mplew.write((mRing != null) ? 1 : 0);
        /* 2093 */
        if (mRing != null) {
            /* 2094 */
            mplew.writeInt(mRing.getRingId());
            /* 2095 */
            mplew.writeInt(chr.getId());
            /* 2096 */
            mplew.writeInt(mRing.getPartnerChrId());
            /* 2097 */
            mplew.writeShort(3);
            /* 2098 */
            mplew.writeInt(mRing.getItemId());
            /* 2099 */
            mplew.writeInt(mRing.getItemId());
            /* 2100 */
            mplew.writeAsciiString(chr.getName(), 13);
            /* 2101 */
            mplew.writeAsciiString(mRing.getPartnerName(), 13);

        }

        /* 2104 */
        List<Integer> prof = chr.getProfessions();
        /* 2105 */
        mplew.write(prof.size());
        /* 2106 */
        for (Iterator<Integer> iterator1 = prof.iterator(); iterator1.hasNext(); ) {
            int j = ((Integer) iterator1.next()).intValue();
            /* 2107 */
            mplew.writeShort(j);
        }


        /* 2110 */
        if (chr.getGuildId() <= 0) {
            /* 2111 */
            mplew.writeMapleAsciiString("-");
            /* 2112 */
            mplew.writeMapleAsciiString("");

        } else {
            /* 2114 */
            MapleGuild gs = WorldGuildService.getInstance().getGuild(chr.getGuildId());
            /* 2115 */
            if (gs != null) {
                /* 2116 */
                mplew.writeMapleAsciiString(gs.getName());
                /* 2117 */
                if (gs.getAllianceId() > 0) {
                    /* 2118 */
                    MapleGuildAlliance allianceName = WorldAllianceService.getInstance().getAlliance(gs.getAllianceId());
                    /* 2119 */
                    if (allianceName != null) {
                        /* 2120 */
                        mplew.writeMapleAsciiString(allianceName.getName());

                    } else {
                        /* 2122 */
                        mplew.writeMapleAsciiString("");

                    }

                } else {
                    /* 2125 */
                    mplew.writeMapleAsciiString("");

                }

            } else {
                /* 2128 */
                mplew.writeMapleAsciiString("-");
                /* 2129 */
                mplew.writeMapleAsciiString("");

            }

        }
        /* 2132 */
        mplew.write(0);
        /* 2133 */
        mplew.write(isSelf ? 1 : 0);

        /* 2135 */
        MaplePet[] pets = chr.getSpawnPets();
        /* 2136 */
        mplew.write((chr.getSpawnPet(0) != null) ? 1 : 0);
        /* 2137 */
        for (int i = 0; i < 3; i++) {
            /* 2138 */
            if (pets[i] != null && pets[i].getSummoned()) {
                /* 2139 */
                mplew.write(1);
                /* 2140 */
                mplew.writeInt(i);
                /* 2141 */
                mplew.writeInt(pets[i].getPetItemId());
                /* 2142 */
                mplew.writeMapleAsciiString(pets[i].getName());
                /* 2143 */
                mplew.write(pets[i].getLevel());
                /* 2144 */
                mplew.writeShort(pets[i].getCloseness());
                /* 2145 */
                mplew.write(pets[i].getFullness());
                /* 2146 */
                mplew.writeShort(pets[i].getFlags());
                /* 2147 */
                Item inv = chr.getInventory(MapleInventoryType.EQUIPPED).getItem((short) ((i == 0) ? -114 : ((i == 1) ? -122 : -124)));
                /* 2148 */
                mplew.writeInt((inv == null) ? 0 : inv.getItemId());
                /* 2149 */
                mplew.writeInt(-1);

            }

        }
        /* 2152 */
        mplew.write(0);




























        /* 2181 */
        Item medal = chr.getInventory(MapleInventoryType.EQUIPPED).getItem((short) -26);
        /* 2182 */
        mplew.writeInt((medal == null) ? 0 : medal.getItemId());

        /* 2184 */
        List<Pair<Integer, Long>> medalQuests = chr.getCompletedMedals();
        /* 2185 */
        mplew.writeShort(medalQuests.size());
        /* 2186 */
        for (Pair<Integer, Long> x : medalQuests) {
            /* 2187 */
            mplew.writeInt(((Integer) x.left).intValue());
            /* 2188 */
            mplew.writeLong(((Long) x.right).longValue());

        }









        /* 2199 */
        writeDamageSkinData(mplew, chr);


        /* 2202 */
        for (MapleTraitType t : MapleTraitType.values()) {
            /* 2203 */
            mplew.write(chr.getTrait(t).getLevel());

        }
        /* 2205 */
        mplew.writeInt(0);
        /* 2206 */
        mplew.writeInt(0);
        /* 2207 */
        mplew.writeBool(false);




        /* 2212 */
        List<Integer> chairs = new ArrayList<>();
        /* 2213 */
        for (Item item : chr.getInventory(MapleInventoryType.SETUP).newList()) {
            /* 2214 */
            if (item.getItemId() / 10000 == 301 && !chairs.contains(Integer.valueOf(item.getItemId()))) {
                /* 2215 */
                chairs.add(Integer.valueOf(item.getItemId()));

            }

        }
        /* 2218 */
        mplew.writeInt(chairs.size());
        /* 2219 */
        for (Iterator<Integer> iterator2 = chairs.iterator(); iterator2.hasNext(); ) {
            int j = ((Integer) iterator2.next()).intValue();
            /* 2220 */
            mplew.writeInt(j);
        }


        /* 2223 */
        List<Integer> medals = new ArrayList<>();
        /* 2224 */
        for (Item item : chr.getInventory(MapleInventoryType.EQUIP).list()) {
            /* 2225 */
            if (item.getItemId() >= 1142000 && item.getItemId() < 1152000) {
                /* 2226 */
                medals.add(Integer.valueOf(item.getItemId()));

            }

        }
        /* 2229 */
        mplew.writeInt(medals.size());
        /* 2230 */
        for (Iterator<Integer> iterator3 = medals.iterator(); iterator3.hasNext(); ) {
            int j = ((Integer) iterator3.next()).intValue();
            /* 2231 */
            mplew.writeInt(j);
        }



        /* 2235 */
        return mplew.getPacket();

    }



    public static byte[] updateMount(MapleCharacter chr, boolean levelup) {
        /* 2239 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2240 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2242 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2244 */
        mplew.writeShort(SendPacketOpcode.UPDATE_MOUNT.getValue());
        /* 2245 */
        mplew.writeInt(chr.getId());
        /* 2246 */
        mplew.writeInt(chr.getMount().getLevel());
        /* 2247 */
        mplew.writeInt(chr.getMount().getExp());
        /* 2248 */
        mplew.writeInt(chr.getMount().getFatigue());
        /* 2249 */
        mplew.write(levelup ? 1 : 0);

        /* 2251 */
        return mplew.getPacket();

    }



















    public static byte[] updateSkill(int skillid, int level, int masterlevel, long expiration) {
        /* 2271 */
        boolean isProfession = (skillid == 92000000 || skillid == 92010000 || skillid == 92020000 || skillid == 92030000 || skillid == 92040000);
        /* 2272 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2274 */
        mplew.writeShort(SendPacketOpcode.UPDATE_SKILLS.getValue());
        /* 2275 */
        mplew.write(isProfession ? 0 : 1);
        /* 2276 */
        mplew.write(0);
        /* 2277 */
        mplew.write(0);
        /* 2278 */
        mplew.writeShort(1);
        /* 2279 */
        mplew.writeInt(skillid);
        /* 2280 */
        mplew.writeInt(level);
        /* 2281 */
        mplew.writeInt(masterlevel);
        /* 2282 */
        PacketHelper.addExpirationTime(mplew, expiration);
        /* 2283 */
        mplew.write(isProfession ? 4 : 3);

        /* 2285 */
        return mplew.getPacket();

    }



    public static byte[] updateSkills(Map<Integer, SkillEntry> update) {
        /* 2289 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2291 */
        mplew.writeShort(SendPacketOpcode.UPDATE_SKILLS.getValue());
        /* 2292 */
        mplew.write(1);
        /* 2293 */
        mplew.write(0);
        /* 2294 */
        mplew.write(0);
        /* 2295 */
        mplew.writeShort(update.size());
        /* 2296 */
        for (Map.Entry<Integer, SkillEntry> skills : update.entrySet()) {
            /* 2297 */
            mplew.writeInt(((Integer) skills.getKey()).intValue());
            /* 2298 */
            mplew.writeInt(((SkillEntry) skills.getValue()).skillevel);
            /* 2299 */
            mplew.writeInt(((SkillEntry) skills.getValue()).masterlevel);
            /* 2300 */
            PacketHelper.addExpirationTime(mplew, ((SkillEntry) skills.getValue()).expiration);

        }
        /* 2302 */
        mplew.write(4);

        /* 2304 */
        return mplew.getPacket();

    }



    public static byte[] updatePetSkill(int skillid, int level, int masterlevel, long expiration) {
        /* 2308 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2310 */
        mplew.writeShort(SendPacketOpcode.UPDATE_SKILLS.getValue());
        /* 2311 */
        mplew.write(0);
        /* 2312 */
        mplew.write(1);
        /* 2313 */
        mplew.write(0);
        /* 2314 */
        mplew.writeShort(1);
        /* 2315 */
        mplew.writeInt(skillid);
        /* 2316 */
        mplew.writeInt((level == 0) ? -1 : level);
        /* 2317 */
        mplew.writeInt(masterlevel);
        /* 2318 */
        PacketHelper.addExpirationTime(mplew, expiration);
        /* 2319 */
        mplew.write(4);

        /* 2321 */
        return mplew.getPacket();

    }



    public static byte[] updateQuestMobKills(MapleQuestStatus status) {
        /* 2325 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2326 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 2328 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2330 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 2331 */
        mplew.write(ServerConstants.MapleStatusInfo.更新任务状态.getType());
        /* 2332 */
        mplew.writeInt(status.getQuest().getId());
        /* 2333 */
        mplew.write(1);
        /* 2334 */
        StringBuilder sb = new StringBuilder();
        /* 2335 */
        for (Iterator<Integer> iterator = status.getMobKills().values().iterator(); iterator.hasNext(); ) {
            int kills = ((Integer) iterator.next()).intValue();
            /* 2336 */
            sb.append(StringUtil.getLeftPaddedStr(String.valueOf(kills), '0', 3));
        }

        /* 2338 */
        mplew.writeMapleAsciiString(sb.toString());

        /* 2340 */
        return mplew.getPacket();

    }



    public static byte[] getShowQuestCompletion(int id) {
        /* 2344 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2345 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2347 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2349 */
        mplew.writeShort(SendPacketOpcode.SHOW_QUEST_COMPLETION.getValue());
        /* 2350 */
        mplew.writeInt(id);

        /* 2352 */
        return mplew.getPacket();

    }






    public static byte[] getKeymap(MapleCharacter chr) {
        /* 2359 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2360 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2362 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2364 */
        mplew.writeShort(SendPacketOpcode.KEYMAP.getValue());
        /* 2365 */
        MapleKeyLayout keymap = chr.getKeyLayout();
        /* 2366 */
        keymap.writeData(mplew, JobConstants.is林之灵(chr.getJob()) ? 5 : 1);

        /* 2368 */
        return mplew.getPacket();

    }






    public static byte[] petAutoHP(int itemId) {
        /* 2375 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2377 */
        mplew.writeShort(SendPacketOpcode.PET_AUTO_HP.getValue());
        /* 2378 */
        mplew.writeInt(itemId);

        /* 2380 */
        return mplew.getPacket();

    }






    public static byte[] petAutoMP(int itemId) {
        /* 2387 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2389 */
        mplew.writeShort(SendPacketOpcode.PET_AUTO_MP.getValue());
        /* 2390 */
        mplew.writeInt(itemId);

        /* 2392 */
        return mplew.getPacket();

    }






    public static byte[] petAutoBuff(int skillId) {
        /* 2399 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2401 */
        mplew.writeShort(SendPacketOpcode.PET_AUTO_BUFF.getValue());
        /* 2402 */
        mplew.writeInt(skillId);

        /* 2404 */
        return mplew.getPacket();

    }






    public static byte[] openFishingStorage(int type, HiredFisher hf, MerchItemPackage pack, int playrId) {
        /* 2411 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();








        /* 2420 */
        mplew.writeShort(SendPacketOpcode.FISHING_STORE.getValue());
        /* 2421 */
        mplew.write(type);
        /* 2422 */
        switch (type) {

            case 33:
                /* 2424 */
                mplew.writeInt(-1);

                break;


            case 35:
                /* 2428 */
                mplew.writeInt((pack != null) ? (int) pack.getMesos() : 0);
                /* 2429 */
                mplew.writeLong((pack != null) ? (int) pack.getExp() : 0L);
                /* 2430 */
                writeHiredFisher(mplew, hf, pack, playrId);

                break;


            case 28:

            case 30:
                /* 2435 */
                mplew.writeInt(hf.getObjectId());
                /* 2436 */
                writeHiredFisher(mplew, hf, pack, playrId);

                break;


            case 15:
                /* 2440 */
                mplew.writeInt(0);
                /* 2441 */
                mplew.write(0);

                break;


            case 22:
                /* 2445 */
                mplew.writeInt(hf.getOwnerId());
                /* 2446 */
                mplew.write(1);

                break;


            case 23:
                /* 2450 */
                mplew.writeInt(hf.getOwnerId());

                break;


            case 43:

            case 45:
                /* 2455 */
                mplew.writeLong(DateUtil.getKoreanTimestamp(hf.getStartTime()));
                /* 2456 */
                mplew.writeLong(DateUtil.getKoreanTimestamp(hf.getStopTime()));

                break;

        }

        /* 2460 */
        return mplew.getPacket();

    }



    public static void writeHiredFisher(MaplePacketLittleEndianWriter mplew, HiredFisher hf, MerchItemPackage itemPackage, int playrId) {
        long l2 = -1;
        mplew.writeLong(l2);
        mplew.writeInt(0);
        EnumMap<MapleInventoryType, ArrayList<Item>> items = new EnumMap<>(MapleInventoryType.class);
        items.put(MapleInventoryType.EQUIP, new ArrayList<>());
        items.put(MapleInventoryType.USE, new ArrayList<>());
        items.put(MapleInventoryType.SETUP, new ArrayList<>());
        items.put(MapleInventoryType.ETC, new ArrayList<>());
        items.put(MapleInventoryType.CASH, new ArrayList<>());
        if (hf != null) {
            hf.getItems().forEach(item -> items.get(ItemConstants.getInventoryType(item.getItem().getItemId())).add(item.getItem()));
        } else if (itemPackage != null) {
            itemPackage.getItems().forEach(item -> items.get(ItemConstants.getInventoryType(item.getItemId())).add(item));
        }
        items.forEach((key, value) -> {
            mplew.write(value.size());
            value.forEach(item -> PacketHelper.addItemInfo(mplew, item));
        });
        items.clear();
        mplew.writeInt(hf != null ? hf.getOwnerId() : playrId);
    }



    public static byte[] fairyPendantMessage(int position, int percent) {
        /* 2487 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2488 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2490 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();






        /* 2497 */
        mplew.writeShort(SendPacketOpcode.FAIRY_PEND_MSG.getValue());
        /* 2498 */
        mplew.writeInt(position);
        /* 2499 */
        mplew.writeInt(0);
        /* 2500 */
        mplew.writeInt(percent);

        /* 2502 */
        return mplew.getPacket();

    }



    public static byte[] giveFameResponse(int mode, String charname, int newfame) {
        /* 2506 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2507 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2509 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2511 */
        mplew.writeShort(SendPacketOpcode.FAME_RESPONSE.getValue());
        /* 2512 */
        mplew.write(0);
        /* 2513 */
        mplew.writeMapleAsciiString(charname);
        /* 2514 */
        mplew.write(mode);
        /* 2515 */
        mplew.writeInt(newfame);

        /* 2517 */
        return mplew.getPacket();

    }



    public static byte[] giveFameErrorResponse(int status) {
        /* 2521 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2522 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2524 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();









        /* 2534 */
        mplew.writeShort(SendPacketOpcode.FAME_RESPONSE.getValue());
        /* 2535 */
        mplew.write(status);

        /* 2537 */
        return mplew.getPacket();

    }



    public static byte[] receiveFame(int mode, String charnameFrom) {
        /* 2541 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2542 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2544 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2546 */
        mplew.writeShort(SendPacketOpcode.FAME_RESPONSE.getValue());
        /* 2547 */
        mplew.write(5);
        /* 2548 */
        mplew.writeMapleAsciiString(charnameFrom);
        /* 2549 */
        mplew.write(mode);

        /* 2551 */
        return mplew.getPacket();

    }



    public static byte[] multiChat(String name, String chattext, int mode) {
        /* 2555 */
        return multiChat(false, name, chattext, mode, null);

    }



    public static byte[] multiChat(boolean ItemChat, String name, String chattext, int mode, Item item) {
        /* 2559 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2560 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2562 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2564 */
        mplew.writeShort(ItemChat ? SendPacketOpcode.ITEM_MULTICHAT.getValue() : SendPacketOpcode.MULTICHAT.getValue());
        /* 2565 */
        mplew.write(mode);
        /* 2566 */
        mplew.writeInt(0);
        /* 2567 */
        mplew.writeInt(0);

        /* 2569 */
        mplew.writeMapleAsciiString(name);
        /* 2570 */
        mplew.writeMapleAsciiString(chattext);
        /* 2571 */
        mplew.writeMapleAsciiString(name);
        /* 2572 */
        mplew.writeMapleAsciiString(chattext);
        /* 2573 */
        mplew.writeInt(0);
        /* 2574 */
        mplew.writeInt(0);
        /* 2575 */
        mplew.write(255);
        /* 2576 */
        mplew.writeInt(0);
        /* 2577 */
        if (ItemChat) {
            /* 2578 */
            mplew.write(1);
            /* 2579 */
            PacketHelper.addItemInfo(mplew, item);
            /* 2580 */
            mplew.writeMapleAsciiString(MapleItemInformationProvider.getInstance().getName(item.getItemId()));

        }

        /* 2583 */
        return mplew.getPacket();

    }



    public static byte[] getClock(int time) {
        /* 2587 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2589 */
        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        /* 2590 */
        mplew.write(2);
        /* 2591 */
        mplew.writeInt(time);

        /* 2593 */
        return mplew.getPacket();

    }



    public static byte[] getClockTime(int hour, int min, int sec) {
        /* 2597 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();





        /* 2603 */
        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        /* 2604 */
        mplew.write(1);
        /* 2605 */
        mplew.write(hour);
        /* 2606 */
        mplew.write(min);
        /* 2607 */
        mplew.write(sec);

        /* 2609 */
        return mplew.getPacket();

    }



    public static byte[] getClockTime1(int type, int time) {
        /* 2613 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2615 */
        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        /* 2616 */
        mplew.write(3);
        /* 2617 */
        mplew.write(type);
        /* 2618 */
        mplew.writeInt(time);

        /* 2620 */
        return mplew.getPacket();

    }



    public static byte[] getClockTime2(int type, int time) {
        /* 2624 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2626 */
        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        /* 2627 */
        mplew.write(5);
        /* 2628 */
        mplew.write(type);
        /* 2629 */
        mplew.writeInt(time);

        /* 2631 */
        return mplew.getPacket();

    }



    public static byte[] getClockTime3(int totalTime, int time) {
        /* 2635 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2637 */
        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        /* 2638 */
        mplew.write(8);
        /* 2639 */
        mplew.writeInt(time);
        /* 2640 */
        mplew.writeInt(totalTime);

        /* 2642 */
        return mplew.getPacket();

    }



    public static byte[] getClockTime4(int remainingTime, int time) {
        /* 2646 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2648 */
        mplew.writeShort(SendPacketOpcode.CLOCK.getValue());
        /* 2649 */
        mplew.write(40);
        /* 2650 */
        mplew.writeInt(time);
        /* 2651 */
        mplew.writeInt(remainingTime);

        /* 2653 */
        return mplew.getPacket();

    }






    public static byte[] stopClock() {
        /* 2660 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2661 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2663 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2665 */
        mplew.writeShort(SendPacketOpcode.STOP_CLOCK.getValue());

        /* 2667 */
        return mplew.getPacket();

    }








    public static byte[] spawnMist(MapleMist mist) {

        int skillid;
        /* 2677 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2678 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2680 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


















        /* 2699 */
        mplew.writeShort(SendPacketOpcode.SPAWN_MIST.getValue());
        /* 2700 */
        mplew.writeInt(mist.getObjectId());
        /* 2701 */
        mplew.writeInt(mist.getMistType());
        /* 2702 */
        mplew.writeInt(mist.getOwnerId());

        /* 2704 */
        if (mist.getMobSkill() == null) {
            /* 2705 */
            skillid = mist.getSourceSkill().getId();

        } else {
            /* 2707 */
            skillid = mist.getMobSkill().getSkillId();

        }
        /* 2709 */
        mplew.writeInt(skillid);
        /* 2710 */
        mplew.writeShort(mist.getSkillLevel());
        /* 2711 */
        mplew.writeShort(mist.getSkillDelay());
        /* 2712 */
        mplew.writeRect(mist.getBox());
        /* 2713 */
        mplew.writeInt(mist.getSubtype());
        /* 2714 */
        mplew.writePos((mist.getOwnerPosition() != null) ? mist.getOwnerPosition() : mist.getPosition());
        /* 2715 */
        mplew.writeShort((skillid == 227) ? (mist.getPosition()).x : 0);
        /* 2716 */
        mplew.writeShort(mist.getForce());
        /* 2717 */
        mplew.writeInt(0);

        /* 2719 */
        mplew.writeInt(0);
        /* 2720 */
        switch (skillid) {

            case 4121015:

            case 33111013:

            case 33121012:

            case 33121016:

            case 35121052:

            case 51120057:

            case 131001107:

            case 131001207:

            case 400020046:

            case 400021039:

            case 400041008:

            case 400041041:
                /* 2733 */
                mplew.writeBool(!mist.isFacingLeft());

                break;

        }
        /* 2736 */
        if (mist.getMobSkill() == null) {
            /* 2737 */
            mplew.writeInt(mist.getSourceSkill().getDelay());

        } else {
            /* 2739 */
            mplew.writeInt((int) mist.getMobSkill().getDuration());

        }
        /* 2741 */
        mplew.writeBool(false);
        /* 2742 */
        mplew.writeInt(0);
        /* 2743 */
        mplew.writeInt(0);
        /* 2744 */
        mplew.writeInt(0);
        /* 2745 */
        mplew.writeInt(0);

        /* 2747 */
        mplew.writeInt(0);
        /* 2748 */
        mplew.write(0);
        /* 2749 */
        return mplew.getPacket();

    }










    public static byte[] removeMist(int oid, boolean eruption) {
        /* 2760 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 2761 */
        mplew.writeShort(SendPacketOpcode.REMOVE_MIST.getValue());
        /* 2762 */
        mplew.writeInt(oid);
        /* 2763 */
        mplew.write(eruption ? 1 : 0);
        /* 2764 */
        return mplew.getPacket();

    }



    public static byte[] spawnLove(int oid, int itemid, String name, String msg, Point pos, int ft) {
        /* 2768 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2770 */
        mplew.writeShort(SendPacketOpcode.SPAWN_LOVE.getValue());
        /* 2771 */
        mplew.writeInt(oid);
        /* 2772 */
        mplew.writeInt(itemid);
        /* 2773 */
        mplew.writeMapleAsciiString(msg);
        /* 2774 */
        mplew.writeMapleAsciiString(name);
        /* 2775 */
        mplew.writeShort(pos.x);
        /* 2776 */
        mplew.writeShort(pos.y + ft);

        /* 2778 */
        return mplew.getPacket();

    }



    public static byte[] removeLove(int oid, int itemid) {
        /* 2782 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2784 */
        mplew.writeShort(SendPacketOpcode.REMOVE_LOVE.getValue());
        /* 2785 */
        mplew.writeInt(oid);
        /* 2786 */
        mplew.writeInt(itemid);

        /* 2788 */
        return mplew.getPacket();

    }



    public static byte[] itemEffect(int chrId, int itemid, int type) {
        /* 2792 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2793 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2795 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2797 */
        mplew.writeShort(SendPacketOpcode.SHOW_ITEM_EFFECT.getValue());
        /* 2798 */
        mplew.writeInt(chrId);
        /* 2799 */
        mplew.writeInt(itemid);
        /* 2800 */
        mplew.writeInt(type);

        /* 2802 */
        return mplew.getPacket();

    }



    public static byte[] showTitleEffect(int chrId, int itemid) {
        /* 2806 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2807 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2809 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2811 */
        mplew.writeShort(SendPacketOpcode.SHOW_TITLE_EFFECT.getValue());
        /* 2812 */
        mplew.writeInt(chrId);
        /* 2813 */
        mplew.writeInt(itemid);

        /* 2815 */
        return mplew.getPacket();

    }



    public static byte[] showUnkEffect(int chrId, int itemid) {
        /* 2819 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2820 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2822 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2824 */
        mplew.writeShort(SendPacketOpcode.SHOW_UNK_EFFECT.getValue());
        /* 2825 */
        mplew.writeInt(chrId);
        /* 2826 */
        mplew.writeInt(itemid);

        /* 2828 */
        return mplew.getPacket();

    }






    public static byte[] showChair(MapleCharacter player, boolean cancel) {
        /* 2835 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2836 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2838 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2840 */
        mplew.writeShort(SendPacketOpcode.SHOW_CHAIR.getValue());
        /* 2841 */
        mplew.writeInt(player.getId());
        /* 2842 */
        mplew.writeInt(player.getChair());

        /* 2844 */
        mplew.writeInt(player.getChairMode());
        /* 2845 */
        for (int i = 0; i < (player.getChairMask()).length; i++) {
            /* 2846 */
            mplew.write(player.getChairMask()[i]);

        }
        /* 2848 */
        mplew.writeBool(!cancel);
        /* 2849 */
        if (!cancel) {
            /* 2850 */
            ChairInfo(mplew, player);

        }
        /* 2852 */
        mplew.write(0);

        /* 2854 */
        return mplew.getPacket();

    }




    public static void ChairInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter player) {
        /* 2859 */
        if (player.getChair() / 1000 == 3014) {
            /* 2860 */
            mplew.writeMapleAsciiString(player.getChairMsg());
            /* 2861 */
            mplew.writeMapleAsciiString(player.getName());
            /* 2862 */
            mplew.writeMapleAsciiString("[椅子]" + player.getChairMsg());
            /* 2863 */
            mplew.writeInt(0);
            /* 2864 */
            mplew.writeInt(0);
            /* 2865 */
            mplew.writeInt(0);
            /* 2866 */
            mplew.write(0);
            /* 2867 */
        } else if (player.getChair() / 1000 == 3017) {
            /* 2868 */
            writeChairData(mplew, player);





        }

        else {




            /* 2879 */
            switch (player.getChair()) {

                case 3015642:

                case 3018018:

                case 3018020:

                case 3018057:

                case 3018093:

                case 3018094:

                case 3018095:

                case 3018096:

                case 3018097:

                case 3018098:

                case 3018116:

                case 3018117:

                case 3018118:

                case 3018119:

                case 3018120:

                case 3018121:

                case 3018138:

                case 3018150:

                case 3018151:

                case 3018190:

                case 3018193:

                case 3018221:

                case 3018222:

                case 3018223:

                case 3018238:

                case 3018239:

                case 3018240:

                case 3018241:

                case 3018242:

                case 3018243:

                case 3018291:

                case 3018292:

                case 3018293:

                case 3018294:

                case 3018309:

                case 3018310:

                case 3018318:

                case 3018319:

                case 3018342:

                case 3018345:

                case 3018346:

                case 3018347:

                case 3018349:

                case 3018359:

                case 3018380:

                case 3018384:

                case 3018429:

                case 3018465:

                case 3018475:

                case 3018486:

                case 3018487:

                case 3018488:

                case 3018489:

                    break;

















                case 3018071:

                case 3018464:
                    /* 2952 */
                    mplew.write(0);

                    break;

                case 3018467:
                    /* 2955 */
                    mplew.writeZeroBytes(21);

                    break;





                default:
                    /* 2962 */
                    mplew.writeInt(0);
                    /* 2963 */
                    mplew.write(0);
                    /* 2964 */
                    mplew.writeInt(0);

                    break;

            }
            /* 2967 */
            switch (player.getChair()) {


                case 3018179:

                case 3018418:
                    /* 2971 */
                    mplew.writeZeroBytes(27);

                    break;

            }

        }

    }






    public static void writeChairData(MaplePacketLittleEndianWriter mplew, MapleCharacter player) {
        /* 2981 */
        ArrayList<Integer> arrayList = new ArrayList<>();
        /* 2982 */
        player.getInfoQuest(7266);
        String string;
        /* 2983 */
        for (int i2 = 0; i2 < 6 && (string = player.getOneInfo(7266, String.valueOf(i2))) != null && Integer.valueOf(string).intValue() > 0; i2++) {
            /* 2984 */
            arrayList.add(Integer.valueOf(string));

        }
        /* 2986 */
        mplew.writeInt(arrayList.size());
        /* 2987 */
        arrayList.forEach(mplew::writeInt);

    }



    public static byte[] addChairMeso(int cid, int value) {
        /* 2991 */
        if (ServerConfig.DEBUG_MODE) {
            /* 2992 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 2994 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 2996 */
        mplew.writeShort(SendPacketOpcode.SHOW_CHAIR.getValue());
        /* 2997 */
        mplew.writeInt(cid);
        /* 2998 */
        mplew.writeInt(value);
        /* 2999 */
        mplew.writeInt(1);

        /* 3001 */
        return mplew.getPacket();

    }



    public static byte[] UseChairUnk(int unk) {
        /* 3005 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3007 */
        mplew.writeShort(SendPacketOpcode.USE_CHAIR_UNK.getValue());
        /* 3008 */
        mplew.writeInt(unk);

        /* 3010 */
        return mplew.getPacket();

    }



    public static byte[] useTowerChairSetting() {
        /* 3014 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3016 */
        mplew.writeShort(SendPacketOpcode.USE_TOWERCHAIR_SETTING_RESULT.getValue());
        /* 3017 */
        return mplew.getPacket();

    }


















    public static byte[] cancelChair(int cid, int chairID) {
        /* 3036 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3037 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3039 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3041 */
        mplew.writeShort(SendPacketOpcode.CANCEL_CHAIR.getValue());
        /* 3042 */
        mplew.writeInt(cid);
        /* 3043 */
        mplew.writeBool((chairID != -1));
        /* 3044 */
        if (chairID != -1) {
            /* 3045 */
            mplew.writeShort(chairID);

        }

        /* 3048 */
        return mplew.getPacket();

    }



    public static byte[] spawnReactor(MapleReactor reactor) {
        /* 3052 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3053 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }











        /* 3066 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3068 */
        mplew.writeShort(SendPacketOpcode.REACTOR_SPAWN.getValue());
        /* 3069 */
        mplew.writeInt(reactor.getObjectId());
        /* 3070 */
        mplew.writeInt(reactor.getReactorId());
        /* 3071 */
        mplew.write(reactor.getState());
        /* 3072 */
        mplew.writePos(reactor.getTruePosition());
        /* 3073 */
        mplew.write(reactor.getFacingDirection());
        /* 3074 */
        mplew.writeMapleAsciiString(reactor.getName());

        /* 3076 */
        return mplew.getPacket();

    }



    public static byte[] triggerReactor(MapleReactor reactor) {
        /* 3080 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3081 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3083 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3085 */
        mplew.writeShort(SendPacketOpcode.REACTOR_HIT.getValue());
        /* 3086 */
        mplew.writeInt(reactor.getObjectId());
        /* 3087 */
        mplew.write(reactor.getState());
        /* 3088 */
        mplew.writePos(reactor.getTruePosition());
        /* 3089 */
        mplew.writeShort(reactor.getStance());
        /* 3090 */
        mplew.write(reactor.getProperEventIdx());
        /* 3091 */
        mplew.write(reactor.getStateEnd());
        /* 3092 */
        mplew.writeInt(reactor.getOwnerID());

        /* 3094 */
        mplew.write(0);
        /* 3095 */
        mplew.writeShort(0);


        /* 3098 */
        return mplew.getPacket();

    }

























    public static byte[] destroyReactor(MapleReactor reactor) {
        /* 3124 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3125 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3127 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3129 */
        mplew.writeShort(SendPacketOpcode.REACTOR_DESTROY.getValue());
        /* 3130 */
        mplew.writeInt(reactor.getObjectId());
        /* 3131 */
        mplew.writeInt(reactor.getReactorId());
        /* 3132 */
        mplew.write(reactor.getState());
        /* 3133 */
        mplew.writePos(reactor.getPosition());
        /* 3134 */
        mplew.write(0);
        /* 3135 */
        mplew.writeMapleAsciiString(reactor.getName());

        /* 3137 */
        return mplew.getPacket();

    }



    public static byte[] musicChange(String song) {
        /* 3141 */
        return environmentChange(song, BossEffectOpcode.ChangeBGM.getValue(), 0);

    }



    public static byte[] showEffect(String effect) {
        /* 3145 */
        return environmentChange(effect, BossEffectOpcode.Screen_Delayed.getValue(), 0);

    }



    public static byte[] playSound(String sound) {
        /* 3149 */
        return environmentChange(sound, BossEffectOpcode.Sound.getValue(), 100);

    }



    public static byte[] playSound(String sound, int mode) {
        /* 3153 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3155 */
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        /* 3156 */
        mplew.write(FieldEffectOpcode.Sound.getValue());
        /* 3157 */
        mplew.writeMapleAsciiString(sound);
        /* 3158 */
        mplew.writeInt(mode);

        /* 3160 */
        return mplew.getPacket();

    }













    public static byte[] environmentChange(String env, int mode, int unk) {
        /* 3174 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3175 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3177 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3179 */
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        /* 3180 */
        mplew.write(mode);
        /* 3181 */
        mplew.writeMapleAsciiString(env);
        /* 3182 */
        if (mode == BossEffectOpcode.Object_Disable.getValue() || mode == BossEffectOpcode.Sound
/* 3183 */.getValue() || mode == BossEffectOpcode.ChangeBGM
/* 3184 */.getValue() || mode == BossEffectOpcode.Screen_AutoLetterBox
/* 3185 */.getValue() || mode == BossEffectOpcode.Screen_Delayed
/* 3186 */.getValue() || mode == BossEffectOpcode.TopScreen
/* 3187 */.getValue())
             {

            /* 3190 */
            mplew.writeInt(unk);

        }

        /* 3193 */
        if (mode == BossEffectOpcode.ChangeBGM.getValue()) {
            /* 3194 */
            mplew.writeInt(1);

        }

        /* 3197 */
        return mplew.getPacket();

    }



    public static byte[] startMapEffect(String msg, int itemid, boolean active) {
        /* 3201 */
        return startMapEffect(msg, 0, -1, active);

    }



    public static byte[] startMapEffect(String msg, int itemid, int effectType, boolean active) {
        /* 3205 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3206 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3208 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();






        /* 3215 */
        mplew.writeShort(SendPacketOpcode.MAP_EFFECT.getValue());
        /* 3216 */
        mplew.write(active ? 0 : 1);
        /* 3217 */
        mplew.writeInt(itemid);
        /* 3218 */
        if (effectType > 0) {
            /* 3219 */
            mplew.writeInt(effectType);

        }
        /* 3221 */
        if (active) {
            /* 3222 */
            mplew.writeMapleAsciiString(msg);
            /* 3223 */
            mplew.writeInt(15);

        }
        /* 3225 */
        mplew.write(0);

        /* 3227 */
        return mplew.getPacket();

    }



    public static byte[] removeMapEffect() {
        /* 3231 */
        return startMapEffect(null, 0, -1, false);

    }






    public static byte[] showPredictCard(String name, String otherName, int love, int cardId, int commentId) {
        /* 3238 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3239 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3241 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3243 */
        mplew.writeShort(SendPacketOpcode.SHOW_PREDICT_CARD.getValue());
        /* 3244 */
        mplew.writeMapleAsciiString(name);
        /* 3245 */
        mplew.writeMapleAsciiString(otherName);
        /* 3246 */
        mplew.writeInt(love);
        /* 3247 */
        mplew.writeInt(cardId);
        /* 3248 */
        mplew.writeInt(commentId);

        /* 3250 */
        return mplew.getPacket();

    }



    public static byte[] skillEffect(int fromId, int skillId, byte level, byte display, byte direction, byte speed, Point position) {
        /* 3254 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3255 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3257 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3259 */
        mplew.writeShort(SendPacketOpcode.SKILL_EFFECT.getValue());
        /* 3260 */
        mplew.writeInt(fromId);
        /* 3261 */
        mplew.writeInt(skillId);
        /* 3262 */
        mplew.write(level);
        /* 3263 */
        mplew.write(display);
        /* 3264 */
        mplew.write(direction);
        /* 3265 */
        mplew.write(speed);
        /* 3266 */
        if (position != null) {
            /* 3267 */
            mplew.writePos(position);

        }

        /* 3270 */
        return mplew.getPacket();

    }



    public static byte[] skillCancel(MapleCharacter from, int skillId) {
        /* 3274 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3275 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3277 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3279 */
        mplew.writeShort(SendPacketOpcode.CANCEL_SKILL_EFFECT.getValue());
        /* 3280 */
        mplew.writeInt(from.getId());
        /* 3281 */
        mplew.writeInt(skillId);

        /* 3283 */
        return mplew.getPacket();

    }



    public static byte[] sendHint(String hint, int width, int time) {
        /* 3287 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3288 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3290 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3292 */
        if (width < 1) {
            /* 3293 */
            width = hint.length() * 10;
            /* 3294 */
            if (width < 40) {
                /* 3295 */
                width = 40;

            }

        }
        /* 3298 */
        if (time < 5) {
            /* 3299 */
            time = 5;

        }
        /* 3301 */
        mplew.writeShort(SendPacketOpcode.PLAYER_HINT.getValue());
        /* 3302 */
        mplew.writeMapleAsciiString(hint);
        /* 3303 */
        mplew.writeShort(width);
        /* 3304 */
        mplew.writeShort(time);
        /* 3305 */
        mplew.write(1);

        /* 3307 */
        return mplew.getPacket();

    }



    public static byte[] showEquipEffect() {
        /* 3311 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3312 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3314 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3316 */
        mplew.writeShort(SendPacketOpcode.SHOW_EQUIP_EFFECT.getValue());

        /* 3318 */
        return mplew.getPacket();

    }



    public static byte[] showEquipEffect(int team) {
        /* 3322 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3323 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3325 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3327 */
        mplew.writeShort(SendPacketOpcode.SHOW_EQUIP_EFFECT.getValue());
        /* 3328 */
        mplew.writeShort(team);

        /* 3330 */
        return mplew.getPacket();

    }



    public static byte[] skillCooldown(int skillId, int time) {
        /* 3334 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3335 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3337 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3339 */
        mplew.writeShort(SendPacketOpcode.COOLDOWN.getValue());
        /* 3340 */
        mplew.writeInt(1);
        /* 3341 */
        mplew.writeInt(skillId);
        /* 3342 */
        mplew.writeInt(time * 1000);

        /* 3344 */
        return mplew.getPacket();

    }



    public static byte[] useSkillBook(MapleCharacter chr, int skillid, int maxlevel, boolean canuse, boolean success) {
        /* 3348 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3349 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3351 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3353 */
        mplew.writeShort(SendPacketOpcode.USE_SKILL_BOOK.getValue());
        /* 3354 */
        mplew.write(0);
        /* 3355 */
        mplew.writeInt(chr.getId());
        /* 3356 */
        mplew.write(1);
        /* 3357 */
        mplew.writeInt(skillid);
        /* 3358 */
        mplew.writeInt(maxlevel);
        /* 3359 */
        mplew.write(canuse ? 1 : 0);
        /* 3360 */
        mplew.write(success ? 1 : 0);

        /* 3362 */
        return mplew.getPacket();

    }



    public static byte[] getMacros(SkillMacro[] macros) {
        /* 3366 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3368 */
        mplew.writeShort(SendPacketOpcode.SKILL_MACRO.getValue());
        /* 3369 */
        int count = 0;
        int i;
        /* 3370 */
        for (i = 0; i < 5; i++) {
            /* 3371 */
            if (macros[i] != null) {
                /* 3372 */
                count++;

            }

        }
        /* 3375 */
        mplew.write(count);
        /* 3376 */
        for (i = 0; i < 5; i++) {
            /* 3377 */
            SkillMacro macro = macros[i];
            /* 3378 */
            if (macro != null) {
                /* 3379 */
                mplew.writeMapleAsciiString(macro.getName());
                /* 3380 */
                mplew.write(macro.getShout());
                /* 3381 */
                mplew.writeInt(macro.getSkill1());
                /* 3382 */
                mplew.writeInt(macro.getSkill2());
                /* 3383 */
                mplew.writeInt(macro.getSkill3());

            }

        }

        /* 3387 */
        return mplew.getPacket();

    }



    public static byte[] boatPacket(int effect) {
        /* 3391 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3392 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3394 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /* 3397 */
        mplew.writeShort(SendPacketOpcode.BOAT_EFFECT.getValue());
        /* 3398 */
        mplew.writeShort(effect);


        /* 3401 */
        return mplew.getPacket();

    }



    public static byte[] boatEffect(int effect) {
        /* 3405 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3406 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3408 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /* 3411 */
        mplew.writeShort(SendPacketOpcode.BOAT_EFF.getValue());
        /* 3412 */
        mplew.writeShort(effect);


        /* 3415 */
        return mplew.getPacket();

    }



    public static byte[] removeItemFromDuey(boolean remove, int Package) {
        /* 3419 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3420 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3422 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3424 */
        mplew.writeShort(SendPacketOpcode.DUEY.getValue());
        /* 3425 */
        mplew.write(24);
        /* 3426 */
        mplew.writeInt(Package);
        /* 3427 */
        mplew.write(remove ? 3 : 4);

        /* 3429 */
        return mplew.getPacket();

    }



    public static byte[] sendDuey(byte operation, List<MapleDueyActions> packages) {
        /* 3433 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3434 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3436 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3438 */
        mplew.writeShort(SendPacketOpcode.DUEY.getValue());
        /* 3439 */
        mplew.write(operation);
        /* 3440 */
        switch (operation) {

            case 9:
                /* 3442 */
                mplew.write(1);

                break;



            case 10:
                /* 3447 */
                mplew.write(0);
                /* 3448 */
                mplew.write(packages.size());
                /* 3449 */
                for (MapleDueyActions dp : packages) {
                    /* 3450 */
                    mplew.writeInt(dp.getPackageId());
                    /* 3451 */
                    mplew.writeAsciiString(dp.getSender(), 13);
                    /* 3452 */
                    mplew.writeInt(dp.getMesos());
                    /* 3453 */
                    mplew.writeLong(PacketHelper.getTime(dp.getSentTime()));
                    /* 3454 */
                    mplew.writeZeroBytes(202);
                    /* 3455 */
                    if (dp.getItem() != null) {
                        /* 3456 */
                        mplew.write(1);
                        /* 3457 */
                        PacketHelper.addItemInfo(mplew, dp.getItem());
                        continue;

                    }
                    /* 3459 */
                    mplew.write(0);

                }

                /* 3462 */
                mplew.write(0);

                break;

        }

        /* 3466 */
        return mplew.getPacket();

    }



    public static byte[] enableTV() {
        /* 3470 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3472 */
        mplew.writeShort(SendPacketOpcode.ENABLE_TV.getValue());
        /* 3473 */
        mplew.writeInt(0);
        /* 3474 */
        mplew.write(0);

        /* 3476 */
        return mplew.getPacket();

    }



    public static byte[] removeTV() {
        /* 3480 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3482 */
        mplew.writeShort(SendPacketOpcode.REMOVE_TV.getValue());

        /* 3484 */
        return mplew.getPacket();

    }



    public static byte[] sendTV(MapleCharacter chr, List<String> messages, int type, MapleCharacter partner, int delay) {
        /* 3488 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3490 */
        mplew.writeShort(SendPacketOpcode.START_TV.getValue());
        /* 3491 */
        mplew.write((partner != null) ? 2 : 1);
        /* 3492 */
        mplew.write(type);
        /* 3493 */
        PacketHelper.addCharLook(mplew, chr, false, chr.isZeroSecondLook());
        /* 3494 */
        mplew.writeMapleAsciiString(chr.getName());

        /* 3496 */
        if (partner != null) {
            /* 3497 */
            mplew.writeMapleAsciiString(partner.getName());

        } else {
            /* 3499 */
            mplew.writeShort(0);

        }
        /* 3501 */
        for (int i = 0; i < messages.size(); i++) {
            /* 3502 */
            if (i == 4 && ((String) messages.get(4)).length() > 15) {
                /* 3503 */
                mplew.writeMapleAsciiString(((String) messages.get(4)).substring(0, 15));

            } else {
                /* 3505 */
                mplew.writeMapleAsciiString(messages.get(i));

            }

        }
        /* 3508 */
        mplew.writeInt(delay);
        /* 3509 */
        if (partner != null) {
            /* 3510 */
            PacketHelper.addCharLook(mplew, partner, false, partner.isZeroSecondLook());

        }

        /* 3513 */
        return mplew.getPacket();

    }



    public static byte[] showQuestMsg(String msg) {
        /* 3517 */
        return serverNotice(5, msg);

    }



    public static byte[] Mulung_Pts(int recv, int total) {
        /* 3521 */
        return showQuestMsg("获得了 " + recv + " 点修炼点数。总修炼点数为 " + total + " 点。");

    }



    public static byte[] showOXQuiz(int questionSet, int questionId, boolean askQuestion) {
        /* 3525 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3526 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3528 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3530 */
        mplew.writeShort(SendPacketOpcode.OX_QUIZ.getValue());
        /* 3531 */
        mplew.write(askQuestion ? 1 : 0);
        /* 3532 */
        mplew.write(questionSet);
        /* 3533 */
        mplew.writeShort(questionId);

        /* 3535 */
        return mplew.getPacket();

    }



    public static byte[] leftKnockBack() {
        /* 3539 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3540 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3542 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3544 */
        mplew.writeShort(SendPacketOpcode.LEFT_KNOCK_BACK.getValue());

        /* 3546 */
        return mplew.getPacket();

    }



    public static byte[] rollSnowball(int type, MapleSnowball.MapleSnowballs ball1, MapleSnowball.MapleSnowballs ball2) {
        /* 3550 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3551 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3553 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3555 */
        mplew.writeShort(SendPacketOpcode.ROLL_SNOWBALL.getValue());
        /* 3556 */
        mplew.write(type);
        /* 3557 */
        mplew.writeInt((ball1 == null) ? 0 : (ball1.getSnowmanHP() / 75));
        /* 3558 */
        mplew.writeInt((ball2 == null) ? 0 : (ball2.getSnowmanHP() / 75));
        /* 3559 */
        mplew.writeShort((ball1 == null) ? 0 : ball1.getPosition());
        /* 3560 */
        mplew.write(0);
        /* 3561 */
        mplew.writeShort((ball2 == null) ? 0 : ball2.getPosition());
        /* 3562 */
        mplew.writeZeroBytes(11);

        /* 3564 */
        return mplew.getPacket();

    }



    public static byte[] enterSnowBall() {
        /* 3568 */
        return rollSnowball(0, null, null);

    }



    public static byte[] hitSnowBall(int team, int damage, int distance, int delay) {
        /* 3572 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3573 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3575 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3577 */
        mplew.writeShort(SendPacketOpcode.HIT_SNOWBALL.getValue());
        /* 3578 */
        mplew.write(team);
        /* 3579 */
        mplew.writeShort(damage);
        /* 3580 */
        mplew.write(distance);
        /* 3581 */
        mplew.write(delay);

        /* 3583 */
        return mplew.getPacket();

    }



    public static byte[] snowballMessage(int team, int message) {
        /* 3587 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3588 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3590 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3592 */
        mplew.writeShort(SendPacketOpcode.SNOWBALL_MESSAGE.getValue());
        /* 3593 */
        mplew.write(team);
        /* 3594 */
        mplew.writeInt(message);

        /* 3596 */
        return mplew.getPacket();

    }



    public static byte[] finishedSort(int type) {
        /* 3600 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3601 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }



        /* 3606 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3608 */
        mplew.writeShort(SendPacketOpcode.FINISH_SORT.getValue());
        /* 3609 */
        mplew.write(1);
        /* 3610 */
        mplew.write(type);

        /* 3612 */
        return mplew.getPacket();

    }




    public static byte[] coconutScore(int[] coconutscore) {
        /* 3617 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3618 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3620 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3622 */
        mplew.writeShort(SendPacketOpcode.COCONUT_SCORE.getValue());
        /* 3623 */
        mplew.writeShort(coconutscore[0]);
        /* 3624 */
        mplew.writeShort(coconutscore[1]);

        /* 3626 */
        return mplew.getPacket();

    }




    public static byte[] hitCoconut(boolean spawn, int id, int type) {
        /* 3631 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3632 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3634 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3636 */
        mplew.writeShort(SendPacketOpcode.HIT_COCONUT.getValue());
        /* 3637 */
        if (spawn) {
            /* 3638 */
            mplew.write(0);
            /* 3639 */
            mplew.writeInt(128);

        } else {
            /* 3641 */
            mplew.writeInt(id);
            /* 3642 */
            mplew.write(type);

        }

        /* 3645 */
        return mplew.getPacket();

    }



    public static byte[] finishedGather(int type) {
        /* 3649 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3650 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }



        /* 3655 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3657 */
        mplew.writeShort(SendPacketOpcode.FINISH_GATHER.getValue());
        /* 3658 */
        mplew.write(1);
        /* 3659 */
        mplew.write(type);

        /* 3661 */
        return mplew.getPacket();

    }



    public static byte[] yellowChat(String msg) {
        /* 3665 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /* 3668 */
        mplew.writeShort(SendPacketOpcode.SPOUSE_MESSAGE.getValue());
        /* 3669 */
        mplew.writeShort(7);
        /* 3670 */
        mplew.writeMapleAsciiString(msg);

        /* 3672 */
        return mplew.getPacket();

    }



    public static byte[] getPeanutResult(int itemId, short quantity, int ourItem, int ourSlot, int itemId2, short quantity2) {
        /* 3676 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3677 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3679 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3681 */
        mplew.writeShort(SendPacketOpcode.PIGMI_REWARD.getValue());
        /* 3682 */
        mplew.writeInt(itemId);
        /* 3683 */
        mplew.writeShort(quantity);
        /* 3684 */
        mplew.writeInt(ourItem);
        /* 3685 */
        mplew.writeInt(ourSlot);
        /* 3686 */
        mplew.writeInt(itemId2);
        /* 3687 */
        mplew.writeInt(quantity2);
        /* 3688 */
        mplew.writeShort(0);

        /* 3690 */
        return mplew.getPacket();

    }






    public static byte[] sendLevelup(boolean family, int level, String name) {
        /* 3697 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3698 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3700 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3702 */
        mplew.writeShort(SendPacketOpcode.LEVEL_UPDATE.getValue());
        /* 3703 */
        mplew.write(family ? 1 : 2);
        /* 3704 */
        mplew.writeInt(level);
        /* 3705 */
        mplew.writeMapleAsciiString(name);

        /* 3707 */
        return mplew.getPacket();

    }



    public static byte[] sendMarriage(boolean family, String name) {
        /* 3711 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3712 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3714 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3716 */
        mplew.writeShort(SendPacketOpcode.MARRIAGE_UPDATE.getValue());
        /* 3717 */
        mplew.write(family ? 1 : 0);
        /* 3718 */
        mplew.writeMapleAsciiString(name);

        /* 3720 */
        return mplew.getPacket();

    }



    public static byte[] sendJobup(boolean family, int jobid, String name) {
        /* 3724 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3725 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3727 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3729 */
        mplew.writeShort(SendPacketOpcode.JOB_UPDATE.getValue());
        /* 3730 */
        mplew.write(family ? 1 : 0);
        /* 3731 */
        mplew.writeInt(jobid);
        /* 3732 */
        mplew.writeMapleAsciiString(name);

        /* 3734 */
        return mplew.getPacket();

    }






    public static byte[] showDragonFly(int chrId, int type, int mountId) {
        /* 3741 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3743 */
        mplew.writeShort(SendPacketOpcode.SHOW_DRAGON_FLY.getValue());
        /* 3744 */
        mplew.writeInt(chrId);
        /* 3745 */
        mplew.writeInt(type);
        /* 3746 */
        if (type == 0) {
            /* 3747 */
            mplew.writeInt(mountId);

        }

        /* 3750 */
        return mplew.getPacket();

    }



    public static byte[] temporaryStats_Aran() {
        /* 3754 */
        Map<MapleStat.Temp, Integer> stats = new EnumMap<>(MapleStat.Temp.class);
        /* 3755 */
        stats.put(MapleStat.Temp.力量, Integer.valueOf(999));
        /* 3756 */
        stats.put(MapleStat.Temp.敏捷, Integer.valueOf(999));
        /* 3757 */
        stats.put(MapleStat.Temp.智力, Integer.valueOf(999));
        /* 3758 */
        stats.put(MapleStat.Temp.运气, Integer.valueOf(999));
        /* 3759 */
        stats.put(MapleStat.Temp.物攻, Integer.valueOf(255));
        /* 3760 */
        stats.put(MapleStat.Temp.命中, Integer.valueOf(999));
        /* 3761 */
        stats.put(MapleStat.Temp.回避, Integer.valueOf(999));
        /* 3762 */
        stats.put(MapleStat.Temp.速度, Integer.valueOf(140));
        /* 3763 */
        stats.put(MapleStat.Temp.跳跃, Integer.valueOf(120));
        /* 3764 */
        return temporaryStats(stats);

    }



    public static byte[] temporaryStats_Balrog(MapleCharacter chr) {
        /* 3768 */
        Map<MapleStat.Temp, Integer> stats = new EnumMap<>(MapleStat.Temp.class);
        /* 3769 */
        int offset = 1 + (chr.getLevel() - 90) / 20;


        /* 3772 */
        stats.put(MapleStat.Temp.力量, Integer.valueOf(chr.getStat().getTotalStr() / offset));
        /* 3773 */
        stats.put(MapleStat.Temp.敏捷, Integer.valueOf(chr.getStat().getTotalDex() / offset));
        /* 3774 */
        stats.put(MapleStat.Temp.智力, Integer.valueOf(chr.getStat().getTotalInt() / offset));
        /* 3775 */
        stats.put(MapleStat.Temp.运气, Integer.valueOf(chr.getStat().getTotalLuk() / offset));
        /* 3776 */
        stats.put(MapleStat.Temp.物攻, Integer.valueOf(chr.getStat().getTotalWatk() / offset));
        /* 3777 */
        stats.put(MapleStat.Temp.物防, Integer.valueOf(chr.getStat().getTotalMagic() / offset));
        /* 3778 */
        return temporaryStats(stats);

    }



    public static byte[] temporaryStats(Map<MapleStat.Temp, Integer> mystats) {
        /* 3782 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3783 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3785 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3787 */
        mplew.writeShort(SendPacketOpcode.TEMP_STATS.getValue());






        /* 3794 */
        int updateMask = 0;
        /* 3795 */
        for (MapleStat.Temp statupdate : mystats.keySet()) {
            /* 3796 */
            updateMask |= statupdate.getValue();

        }
        /* 3798 */
        mplew.writeInt(updateMask);

        /* 3800 */
        for (Map.Entry<MapleStat.Temp, Integer> statupdate : mystats.entrySet()) {
            /* 3801 */
            Integer value = Integer.valueOf(((MapleStat.Temp) statupdate.getKey()).getValue());
            /* 3802 */
            if (value.intValue() >= 1) {
                /* 3803 */
                if (value.intValue() <= 512) {
                    /* 3804 */
                    mplew.writeShort(((Integer) statupdate.getValue()).shortValue());
                    continue;

                }
                /* 3806 */
                mplew.write(((Integer) statupdate.getValue()).byteValue());

            }

        }


        /* 3811 */
        return mplew.getPacket();

    }



    public static byte[] temporaryStats_Reset() {
        /* 3815 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3816 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3818 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3820 */
        mplew.writeShort(SendPacketOpcode.TEMP_STATS_RESET.getValue());

        /* 3822 */
        return mplew.getPacket();

    }






    public static byte[] sendLinkSkillWindow(int skillId) {
        /* 3829 */
        return UIPacket.sendUIWindow(3, skillId);

    }






    public static byte[] sendPartyWindow(int npc) {
        /* 3836 */
        return UIPacket.sendUIWindow(21, npc);

    }






    public static byte[] sendRepairWindow(int npc) {
        /* 3843 */
        return UIPacket.sendUIWindow(33, npc);

    }






    public static byte[] sendProfessionWindow(int npc) {
        /* 3850 */
        return UIPacket.sendUIWindow(42, npc);

    }



    public static byte[] sendRedLeaf(int points, boolean viewonly) {
        /* 3854 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(10);

        /* 3856 */
        mplew.writeShort(SendPacketOpcode.REPAIR_WINDOW.getValue());
        /* 3857 */
        mplew.writeInt(115);
        /* 3858 */
        mplew.writeInt(points);
        /* 3859 */
        mplew.write(viewonly ? 1 : 0);

        /* 3861 */
        return mplew.getPacket();

    }



    public static byte[] sendPVPMaps() {
        /* 3865 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3866 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3868 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3870 */
        mplew.writeShort(SendPacketOpcode.PVP_INFO.getValue());
        /* 3871 */
        mplew.write(1);
        /* 3872 */
        mplew.writeInt(0);
        int i;
        /* 3873 */
        for (i = 0; i < 3; i++) {
            /* 3874 */
            mplew.writeInt(1);

        }
        /* 3876 */
        mplew.writeLong(0L);
        /* 3877 */
        for (i = 0; i < 3; i++) {
            /* 3878 */
            mplew.writeInt(1);

        }
        /* 3880 */
        mplew.writeLong(0L);
        /* 3881 */
        for (i = 0; i < 4; i++) {
            /* 3882 */
            mplew.writeInt(1);

        }
        /* 3884 */
        for (i = 0; i < 10; i++) {
            /* 3885 */
            mplew.writeInt(1);

        }
        /* 3887 */
        mplew.writeInt(14);
        /* 3888 */
        mplew.writeShort(100);
        /* 3889 */
        mplew.write(0);

        /* 3891 */
        return mplew.getPacket();

    }



    public static byte[] sendPyramidUpdate(int amount) {
        /* 3895 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3896 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3898 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3900 */
        mplew.writeShort(SendPacketOpcode.PYRAMID_UPDATE.getValue());
        /* 3901 */
        mplew.writeInt(amount);

        /* 3903 */
        return mplew.getPacket();

    }



    public static byte[] sendPyramidResult(byte rank, int amount) {
        /* 3907 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3908 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3910 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3912 */
        mplew.writeShort(SendPacketOpcode.PYRAMID_RESULT.getValue());
        /* 3913 */
        mplew.write(rank);
        /* 3914 */
        mplew.writeInt(amount);

        /* 3916 */
        return mplew.getPacket();

    }








    public static byte[] sendPyramidEnergy(String type, String amount) {
        /* 3925 */
        return sendString(1, type, amount);

    }



    public static byte[] sendString(int type, String object, String amount) {
        /* 3929 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3930 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3932 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3934 */
        switch (type) {

            case 1:
                /* 3936 */
                mplew.writeShort(SendPacketOpcode.ENERGY.getValue());

                break;

            case 2:
                /* 3939 */
                mplew.writeShort(SendPacketOpcode.GHOST_POINT.getValue());

                break;

            case 3:
                /* 3942 */
                mplew.writeShort(SendPacketOpcode.GHOST_STATUS.getValue());

                break;

        }
        /* 3945 */
        mplew.writeMapleAsciiString(object);
        /* 3946 */
        mplew.writeMapleAsciiString(amount);

        /* 3948 */
        return mplew.getPacket();

    }



    public static byte[] sendGhostPoint(String type, String amount) {
        /* 3952 */
        return sendString(2, type, amount);

    }



    public static byte[] sendGhostStatus(String type, String amount) {
        /* 3956 */
        return sendString(3, type, amount);

    }



    public static byte[] MulungEnergy(int energy) {
        /* 3960 */
        return sendPyramidEnergy("energy", String.valueOf(energy));

    }

































    public static byte[] showEventInstructions() {
        /* 3994 */
        if (ServerConfig.DEBUG_MODE) {
            /* 3995 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 3997 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 3999 */
        mplew.writeShort(SendPacketOpcode.GMEVENT_INSTRUCTIONS.getValue());
        /* 4000 */
        mplew.write(0);

        /* 4002 */
        return mplew.getPacket();

    }






    public static byte[] getOwlOpen() {
        /* 4009 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4011 */
        mplew.writeShort(SendPacketOpcode.OWL_OF_MINERVA.getValue());
        /* 4012 */
        mplew.write(10);
        /* 4013 */
        List<Integer> owlItems = RankingWorker.getItemSearch();
        /* 4014 */
        mplew.write(owlItems.size());
        /* 4015 */
        for (Iterator<Integer> iterator = owlItems.iterator(); iterator.hasNext(); ) {
            int i = ((Integer) iterator.next()).intValue();
            /* 4016 */
            mplew.writeInt(i);
        }


        /* 4019 */
        return mplew.getPacket();

    }






    public static byte[] getOwlSearched(int itemSearch, List<HiredMerchant> hms) {
        if (ServerConfig.DEBUG_MODE) {
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());
        }
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.OWL_OF_MINERVA.getValue());
        mplew.write(0x09); //V.112修改 以前是0x08
        mplew.writeInt(0);
        mplew.writeShort(0); //V.112新增 未知
        mplew.writeInt(itemSearch); //要搜索的道具ID
        int size = 0;
        for (HiredMerchant hm : hms) {
            size += hm.searchItem(itemSearch).size();
        }
        mplew.writeInt(size);
        for (HiredMerchant hm : hms) {
            List<MaplePlayerShopItem> items = hm.searchItem(itemSearch);
            for (MaplePlayerShopItem item : items) {
                mplew.writeMapleAsciiString(hm.getOwnerName());
                mplew.writeInt(hm.getMap().getId());
                mplew.writeMapleAsciiString(hm.getDescription());
                mplew.writeInt(item.item.getQuantity()); //道具数量
                mplew.writeInt(item.bundles); //道具份数
                mplew.writeLong(item.price); //道具价格
                switch (InventoryHandler.OWL_ID) {
                    case 0:
                        mplew.writeInt(hm.getOwnerId()); //拥有者ID
                        break;
                    case 1:
                        mplew.writeInt(hm.getStoreId()); //保管的ID?
                        break;
                    default:
                        mplew.writeInt(hm.getObjectId()); //雇佣商人工具ID？
                        break;
                }
                mplew.write(hm.getChannel() - 1); //雇佣商店在几频道
                mplew.write(ItemConstants.getInventoryType(itemSearch).getType());
                if (ItemConstants.getInventoryType(itemSearch) == MapleInventoryType.EQUIP) {
                    PacketHelper.addItemInfo(mplew, item.item);
                }
            }
        }
        return mplew.getPacket();
    }



    public static byte[] getRPSMode(byte mode, int mesos, int selection, int answer) {
        /* 4072 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4073 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4075 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4077 */
        mplew.writeShort(SendPacketOpcode.RPS_GAME.getValue());
        /* 4078 */
        mplew.write(mode);
        /* 4079 */
        switch (mode) {

            case 6:
                /* 4081 */
                if (mesos != -1) {
                    /* 4082 */
                    mplew.writeInt(mesos);

                }

                break;


            case 8:
                /* 4087 */
                mplew.writeInt(9000019);

                break;


            case 11:
                /* 4091 */
                mplew.write(selection);
                /* 4092 */
                mplew.write(answer);

                break;

        }

        /* 4096 */
        return mplew.getPacket();

    }






    public static byte[] followRequest(int chrid) {
        /* 4103 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4104 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4106 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4108 */
        mplew.writeShort(SendPacketOpcode.FOLLOW_REQUEST.getValue());
        /* 4109 */
        mplew.writeInt(chrid);

        /* 4111 */
        return mplew.getPacket();

    }






    public static byte[] followEffect(int initiator, int replier, Point toMap) {
        /* 4118 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4119 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4121 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4123 */
        mplew.writeShort(SendPacketOpcode.FOLLOW_EFFECT.getValue());
        /* 4124 */
        mplew.writeInt(initiator);
        /* 4125 */
        mplew.writeInt(replier);
        /* 4126 */
        if (replier == 0) {
            /* 4127 */
            mplew.write((toMap == null) ? 0 : 1);
            /* 4128 */
            if (toMap != null) {
                /* 4129 */
                mplew.writeInt(toMap.x);
                /* 4130 */
                mplew.writeInt(toMap.y);

            }

        }
        /* 4133 */
        return mplew.getPacket();

    }






    public static byte[] getFollowMsg(int opcode) {
        /* 4140 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4141 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4143 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4145 */
        mplew.writeShort(SendPacketOpcode.FOLLOW_MSG.getValue());




        /* 4150 */
        mplew.writeLong(opcode);

        /* 4152 */
        return mplew.getPacket();

    }




























    public static byte[] moveFollow(int v169, int tEncodedGatherDuration, Point startPos, Point velPos, Point otherEnd, List<LifeMovementFragment> moves) {
        /* 4181 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4182 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4184 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4186 */
        mplew.writeShort(SendPacketOpcode.FOLLOW_MOVE.getValue());
        /* 4187 */
        PacketHelper.serializeMovementList(mplew, v169, tEncodedGatherDuration, startPos, velPos, moves);
        /* 4188 */
        mplew.write(17);
        /* 4189 */
        for (int i = 0; i < 8; i++) {
            /* 4190 */
            mplew.write(0);

        }
        /* 4192 */
        mplew.write(0);
        /* 4193 */
        mplew.writePos(otherEnd);
        /* 4194 */
        mplew.writePos(startPos);

        /* 4196 */
        return mplew.getPacket();

    }






    public static byte[] getFollowMessage(String msg) {
        /* 4203 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4204 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4206 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4208 */
        mplew.writeShort(SendPacketOpcode.SPOUSE_MESSAGE.getValue());
        /* 4209 */
        mplew.writeShort(11);
        /* 4210 */
        mplew.writeMapleAsciiString(msg);

        /* 4212 */
        return mplew.getPacket();

    }



    public static byte[] getMovingPlatforms(MapleMap map) {
        /* 4216 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4217 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4219 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();





















        /* 4241 */
        mplew.writeShort(SendPacketOpcode.MOVE_PLATFORM.getValue());
        /* 4242 */
        mplew.writeInt(map.getPlatforms().size());
        /* 4243 */
        for (MapleNodes.MaplePlatform mp : map.getPlatforms()) {
            /* 4244 */
            mplew.writeMapleAsciiString(mp.name);
            /* 4245 */
            mplew.writeInt(mp.start);
            /* 4246 */
            mplew.writeInt(mp.SN.size());
            /* 4247 */
            for (int x = 0; x < mp.SN.size(); x++) {
                /* 4248 */
                mplew.writeInt(((Integer) mp.SN.get(x)).intValue());

            }
            /* 4250 */
            mplew.writeInt(mp.speed);
            /* 4251 */
            mplew.writeInt(mp.x1);
            /* 4252 */
            mplew.writeInt(mp.x2);
            /* 4253 */
            mplew.writeInt(mp.y1);
            /* 4254 */
            mplew.writeInt(mp.y2);
            /* 4255 */
            mplew.writeInt(mp.x1);
            /* 4256 */
            mplew.writeInt(mp.y1);
            /* 4257 */
            mplew.writeShort(mp.r);

        }
        /* 4259 */
        return mplew.getPacket();

    }








    public static byte[] trembleEffect(int type, int delay, int tremble) {
        /* 4268 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4269 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4271 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4273 */
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        /* 4274 */
        mplew.write(1);
        /* 4275 */
        mplew.write(tremble);
        /* 4276 */
        mplew.writeInt(type);
        /* 4277 */
        mplew.writeShort(delay);

        /* 4279 */
        return mplew.getPacket();

    }



    public static byte[] sendEngagementRequest(String name, int chrId) {
        /* 4283 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4284 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4286 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4288 */
        mplew.writeShort(SendPacketOpcode.ENGAGE_REQUEST.getValue());
        /* 4289 */
        mplew.write(0);
        /* 4290 */
        mplew.writeMapleAsciiString(name);
        /* 4291 */
        mplew.writeInt(chrId);

        /* 4293 */
        return mplew.getPacket();

    }




























    public static byte[] sendEngagement(byte msg, int item, MapleCharacter male, MapleCharacter female) {
        /* 4322 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4323 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4325 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4327 */
        mplew.writeShort(SendPacketOpcode.ENGAGE_RESULT.getValue());
        /* 4328 */
        mplew.write(msg);
        /* 4329 */
        switch (msg) {

            case 13:

            case 14:

            case 17:
                /* 4333 */
                mplew.writeInt(0);
                /* 4334 */
                mplew.writeInt(male.getId());
                /* 4335 */
                mplew.writeInt(female.getId());
                /* 4336 */
                mplew.writeShort((msg == 14) ? 3 : 1);
                /* 4337 */
                mplew.writeInt(item);
                /* 4338 */
                mplew.writeInt(item);
                /* 4339 */
                mplew.writeAsciiString(male.getName(), 13);
                /* 4340 */
                mplew.writeAsciiString(female.getName(), 13);

                break;

        }


        /* 4345 */
        return mplew.getPacket();

    }






    public static byte[] updateJaguar(MapleCharacter from) {
        /* 4352 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4353 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4355 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4357 */
        mplew.writeShort(SendPacketOpcode.UPDATE_JAGUAR.getValue());
        /* 4358 */
        PacketHelper.addJaguarInfo(mplew, from);

        /* 4360 */
        return mplew.getPacket();

    }



    public static byte[] teslaTriangle(int chrId, int sum1, int sum2, int sum3) {
        /* 4364 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4365 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4367 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4369 */
        mplew.writeShort(SendPacketOpcode.TESLA_TRIANGLE.getValue());
        /* 4370 */
        mplew.writeInt(chrId);
        /* 4371 */
        mplew.writeInt(sum1);
        /* 4372 */
        mplew.writeInt(sum2);
        /* 4373 */
        mplew.writeInt(sum3);

        /* 4375 */
        return mplew.getPacket();

    }



    public static byte[] mechPortal(Point pos) {
        /* 4379 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4380 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4382 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4384 */
        mplew.writeShort(SendPacketOpcode.MECH_PORTAL.getValue());
        /* 4385 */
        mplew.writePos(pos);

        /* 4387 */
        return mplew.getPacket();

    }



    public static byte[] spawnMechDoor(MechDoor md, boolean animated) {
        /* 4391 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4392 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4394 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4396 */
        mplew.writeShort(SendPacketOpcode.MECH_DOOR_SPAWN.getValue());
        /* 4397 */
        mplew.write(animated ? 0 : 1);
        /* 4398 */
        mplew.writeInt(md.getOwnerId());
        /* 4399 */
        mplew.writePos(md.getTruePosition());
        /* 4400 */
        mplew.write(md.getId());
        /* 4401 */
        mplew.writeInt(md.getPartyId());

        /* 4403 */
        return mplew.getPacket();

    }



    public static byte[] removeMechDoor(MechDoor md, boolean animated) {
        /* 4407 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4408 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4410 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4412 */
        mplew.writeShort(SendPacketOpcode.MECH_DOOR_REMOVE.getValue());
        /* 4413 */
        mplew.write(animated ? 0 : 1);
        /* 4414 */
        mplew.writeInt(md.getOwnerId());
        /* 4415 */
        mplew.write(md.getId());

        /* 4417 */
        return mplew.getPacket();

    }



    public static byte[] useSPReset(int chrId) {
        /* 4421 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4422 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4424 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4426 */
        mplew.writeShort(SendPacketOpcode.SP_RESET.getValue());
        /* 4427 */
        mplew.write(1);
        /* 4428 */
        mplew.writeInt(chrId);
        /* 4429 */
        mplew.write(1);

        /* 4431 */
        return mplew.getPacket();

    }



    public static byte[] useAPReset(int chrId) {
        /* 4435 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4436 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4438 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4440 */
        mplew.writeShort(SendPacketOpcode.AP_RESET.getValue());
        /* 4441 */
        mplew.write(1);
        /* 4442 */
        mplew.writeInt(chrId);
        /* 4443 */
        mplew.write(1);

        /* 4445 */
        return mplew.getPacket();

    }



    public static byte[] report(int err) {
        /* 4449 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4450 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4452 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4454 */
        mplew.writeShort(SendPacketOpcode.REPORT_RESULT.getValue());
        /* 4455 */
        mplew.write(err);
        /* 4456 */
        if (err == 2) {
            /* 4457 */
            mplew.write(0);
            /* 4458 */
            mplew.writeInt(1);

        }
        /* 4460 */
        return mplew.getPacket();

    }






    public static byte[] sendLieDetector(byte[] image, int attempt) {
        /* 4467 */
        if (ServerConstants.isShowPacket()) {
            /* 4468 */
            log.info("调用: " + (new Throwable()).getStackTrace()[0] + " 测谎仪图片大小: " + image.length + " 换图次数: " + (attempt - 1));

        }
        /* 4470 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4472 */
        mplew.writeShort(SendPacketOpcode.LIE_DETECTOR.getValue());
        /* 4473 */
        mplew.write(9);
        /* 4474 */
        mplew.write(1);
        /* 4475 */
        mplew.write(1);
        /* 4476 */
        mplew.write(attempt - 1);
        /* 4477 */
        if (image == null) {
            /* 4478 */
            mplew.writeInt(0);
            /* 4479 */
            return mplew.getPacket();

        }
        /* 4481 */
        mplew.writeInt(image.length);
        /* 4482 */
        mplew.write(image);

        /* 4484 */
        return mplew.getPacket();

    }



    public static byte[] LieDetectorResponse(byte msg) {
        /* 4488 */
        return LieDetectorResponse(msg, (byte) 0);

    }



    public static byte[] LieDetectorResponse(byte msg, byte msg2) {
        /* 4492 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4494 */
        mplew.writeShort(SendPacketOpcode.LIE_DETECTOR.getValue());





        /* 4500 */
        mplew.write(msg);








        /* 4509 */
        mplew.write(msg2);

        /* 4511 */
        return mplew.getPacket();

    }






    public static byte[] enableReport() {
        /* 4518 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4519 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4521 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);

        /* 4523 */
        mplew.writeShort(SendPacketOpcode.ENABLE_REPORT.getValue());
        /* 4524 */
        mplew.write(1);

        /* 4526 */
        return mplew.getPacket();

    }






    public static byte[] reportResponse(byte mode, int remainingReports) {
        /* 4533 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4534 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4536 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4538 */
        mplew.writeShort(SendPacketOpcode.REPORT_RESPONSE.getValue());
        /* 4539 */
        mplew.writeShort((short) mode);
        /* 4540 */
        if (mode == 2) {
            /* 4541 */
            mplew.write(1);
            /* 4542 */
            mplew.writeInt(remainingReports);

        }

        /* 4545 */
        return mplew.getPacket();

    }






    public static byte[] ultimateExplorer() {
        /* 4552 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4553 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4555 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4557 */
        mplew.writeShort(SendPacketOpcode.ULTIMATE_EXPLORER.getValue());

        /* 4559 */
        return mplew.getPacket();

    }



    public static byte[] pamSongUI() {
        /* 4563 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4564 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4566 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4568 */
        mplew.writeShort(SendPacketOpcode.PAM_SONG.getValue());

        /* 4570 */
        return mplew.getPacket();

    }



    public static byte[] dragonBlink(int portalId) {
        /* 4574 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4575 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4577 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4579 */
        mplew.writeShort(SendPacketOpcode.DRAGON_BLINK.getValue());
        /* 4580 */
        mplew.write(portalId);

        /* 4582 */
        return mplew.getPacket();

    }



    public static byte[] showTraitGain(MapleTraitType trait, int amount) {
        /* 4586 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4587 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 4589 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4591 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 4592 */
        mplew.write(ServerConstants.MapleStatusInfo.获得倾向熟练度.getType());
        /* 4593 */
        mplew.writeLong(trait.getStat().getValue());
        /* 4594 */
        mplew.writeInt(amount);

        /* 4596 */
        return mplew.getPacket();

    }



    public static byte[] showTraitMaxed(MapleTraitType trait) {
        /* 4600 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4601 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 4603 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4605 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 4606 */
        mplew.write(ServerConstants.MapleStatusInfo.超过今天可获得倾向熟练度.getType());
        /* 4607 */
        mplew.writeLong(trait.getStat().getValue());

        /* 4609 */
        return mplew.getPacket();

    }








    public static byte[] harvestMessage(int oid, MapleEnumClass.HarvestMsg msg) {
        /* 4618 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4619 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4621 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4623 */
        mplew.writeShort(SendPacketOpcode.HARVEST_MESSAGE.getValue());
        /* 4624 */
        mplew.writeInt(oid);
        /* 4625 */
        mplew.writeInt(msg.getCode());

        /* 4627 */
        return mplew.getPacket();

    }



    public static byte[] showHarvesting(int chrId, int tool) {
        /* 4631 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4632 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4634 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4636 */
        mplew.writeShort(SendPacketOpcode.SHOW_HARVEST.getValue());
        /* 4637 */
        mplew.writeInt(chrId);
        /* 4638 */
        mplew.write((tool > 0) ? 1 : 0);
        /* 4639 */
        if (tool > 0) {
            /* 4640 */
            mplew.writeInt(tool);
            /* 4641 */
            mplew.writeInt(0);

        }

        /* 4644 */
        return mplew.getPacket();

    }



    public static byte[] harvestResult(int chrId, boolean success) {
        /* 4648 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4649 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4651 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4653 */
        mplew.writeShort(SendPacketOpcode.HARVESTED.getValue());
        /* 4654 */
        mplew.writeInt(chrId);
        /* 4655 */
        mplew.write(success ? 1 : 0);

        /* 4657 */
        return mplew.getPacket();

    }



    public static byte[] makeExtractor(int chrId, String cname, Point pos, int timeLeft, int itemId, int fee) {
        /* 4661 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4662 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4664 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4666 */
        mplew.writeShort(SendPacketOpcode.SPAWN_EXTRACTOR.getValue());
        /* 4667 */
        mplew.writeInt(chrId);
        /* 4668 */
        mplew.writeMapleAsciiString(cname);
        /* 4669 */
        mplew.writeInt(pos.x);
        /* 4670 */
        mplew.writeInt(pos.y);
        /* 4671 */
        mplew.writeShort(timeLeft);
        /* 4672 */
        mplew.writeInt(itemId);
        /* 4673 */
        mplew.writeInt(fee);

        /* 4675 */
        return mplew.getPacket();

    }



    public static byte[] removeExtractor(int chrId) {
        /* 4679 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4680 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4682 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4684 */
        mplew.writeShort(SendPacketOpcode.REMOVE_EXTRACTOR.getValue());
        /* 4685 */
        mplew.writeInt(chrId);
        /* 4686 */
        mplew.writeInt(1);

        /* 4688 */
        return mplew.getPacket();

    }



    public static byte[] spouseMessage(String msg, boolean white) {
        /* 4692 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4694 */
        mplew.writeShort(SendPacketOpcode.SPOUSE_MESSAGE.getValue());
        /* 4695 */
        mplew.writeShort(white ? 10 : 6);
        /* 4696 */
        mplew.writeMapleAsciiString(msg);

        /* 4698 */
        return mplew.getPacket();

    }



    public static byte[] spouseMessage(int op, String msg) {
        /* 4702 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4704 */
        mplew.writeShort(SendPacketOpcode.SPOUSE_MESSAGE.getValue());


























        /* 4731 */
        mplew.writeShort(op);
        /* 4732 */
        mplew.writeMapleAsciiString(msg);

        /* 4734 */
        return mplew.getPacket();

    }






    public static byte[] openBag(int index, int itemId, boolean firstTime) {
        /* 4741 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4742 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4744 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4746 */
        mplew.writeShort(SendPacketOpcode.OPEN_BAG.getValue());
        /* 4747 */
        mplew.writeInt(index);
        /* 4748 */
        mplew.writeInt(itemId);
        /* 4749 */
        mplew.writeShort(firstTime ? 1 : 0);

        /* 4751 */
        return mplew.getPacket();

    }






    public static byte[] craftMake(int chrId, int something, int time) {
        /* 4758 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4759 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4761 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4763 */
        mplew.writeShort(SendPacketOpcode.CRAFT_EFFECT.getValue());
        /* 4764 */
        mplew.writeInt(chrId);
        /* 4765 */
        mplew.writeInt(something);
        /* 4766 */
        mplew.writeInt(time);

        /* 4768 */
        return mplew.getPacket();

    }






    public static byte[] craftFinished(int chrId, int craftID, int ranking, int itemId, int quantity, int exp) {
        /* 4775 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4776 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4778 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4780 */
        mplew.writeShort(SendPacketOpcode.CRAFT_COMPLETE.getValue());
        /* 4781 */
        mplew.writeInt(chrId);
        /* 4782 */
        mplew.writeInt(0);
        /* 4783 */
        mplew.writeInt(craftID);
        /* 4784 */
        mplew.writeInt(ranking);









        /* 4794 */
        mplew.writeBool((ranking == 25 || ranking == 26 || ranking == 27));
        /* 4795 */
        if (ranking == 25 || ranking == 26 || ranking == 27) {
            /* 4796 */
            mplew.writeInt(itemId);
            /* 4797 */
            mplew.writeInt(quantity);

        }
        /* 4799 */
        mplew.writeInt(exp);

        /* 4801 */
        return mplew.getPacket();

    }



    public static byte[] craftExtractorFinished(int cid, int craftID, int ranking, int exp, int type, List<Pair<Integer, Short>> showItems) {
        /* 4805 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4806 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4808 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4810 */
        mplew.writeShort(SendPacketOpcode.CRAFT_COMPLETE.getValue());
        /* 4811 */
        mplew.writeInt(cid);
        /* 4812 */
        mplew.writeInt(type);
        /* 4813 */
        mplew.writeInt(ranking);
        /* 4814 */
        mplew.writeBool((ranking == 25 || ranking == 26 || ranking == 27));
        /* 4815 */
        if (ranking == 25 || ranking == 26 || ranking == 27) {
            /* 4816 */
            mplew.writeInt(showItems.size());
            /* 4817 */
            for (Pair<Integer, Short> pair : showItems) {
                /* 4818 */
                mplew.writeInt(craftID);
                /* 4819 */
                mplew.writeInt(((Integer) pair.getLeft()).intValue());
                /* 4820 */
                mplew.writeInt(((Short) pair.getRight()).shortValue());
                /* 4821 */
                mplew.writeInt(0);
                /* 4822 */
                mplew.writeInt(0);

            }

        }
        /* 4825 */
        mplew.writeInt(exp);
        /* 4826 */
        return mplew.getPacket();

    }






    public static byte[] craftMessage(String msg) {
        /* 4833 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4834 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4836 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4838 */
        mplew.writeShort(SendPacketOpcode.CRAFT_MESSAGE.getValue());
        /* 4839 */
        mplew.writeMapleAsciiString(msg);
        /* 4840 */
        mplew.write(1);

        /* 4842 */
        return mplew.getPacket();

    }



    public static byte[] showEnchanterEffect(int cid, boolean result) {
        /* 4846 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4848 */
        mplew.writeShort(SendPacketOpcode.SHOW_ENCHANTER_EFFECT.getValue());
        /* 4849 */
        mplew.writeInt(cid);
        /* 4850 */
        mplew.writeBool(result);
        /* 4851 */
        mplew.write(0);

        /* 4853 */
        return mplew.getPacket();

    }



    public static byte[] showSoulScrollEffect(int cid, boolean result, boolean destroyed) {
        /* 4857 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4859 */
        mplew.writeShort(SendPacketOpcode.SHOW_SOULSCROLL_EFFECT.getValue());
        /* 4860 */
        mplew.writeInt(cid);
        /* 4861 */
        mplew.writeBool(result);
        /* 4862 */
        mplew.writeBool(destroyed);

        /* 4864 */
        return mplew.getPacket();

    }



    public static byte[] shopDiscount(int percent) {
        /* 4868 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4869 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4871 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4873 */
        mplew.writeShort(SendPacketOpcode.SHOP_DISCOUNT.getValue());
        /* 4874 */
        mplew.write(percent);

        /* 4876 */
        return mplew.getPacket();

    }



    public static byte[] pendantSlot(boolean p) {
        /* 4880 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4881 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4883 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4885 */
        mplew.writeShort(SendPacketOpcode.PENDANT_SLOT.getValue());
        /* 4886 */
        mplew.write(p ? 1 : 0);

        /* 4888 */
        return mplew.getPacket();

    }



    public static byte[] getBuffBar(long millis) {
        /* 4892 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4893 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4895 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4897 */
        mplew.writeShort(SendPacketOpcode.BUFF_BAR.getValue());
        /* 4898 */
        mplew.writeLong(millis);

        /* 4900 */
        return mplew.getPacket();

    }



    public static byte[] showMidMsg(String s, int l) {
        /* 4904 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4906 */
        mplew.writeShort(SendPacketOpcode.MID_MSG.getValue());
        /* 4907 */
        mplew.write(l);
        /* 4908 */
        mplew.writeMapleAsciiString(s);
        /* 4909 */
        mplew.write((s.length() > 0) ? 0 : 1);

        /* 4911 */
        return mplew.getPacket();

    }



    public static byte[] updateGender(MapleCharacter chr) {
        /* 4915 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4916 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4918 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4920 */
        mplew.writeShort(SendPacketOpcode.UPDATE_GENDER.getValue());
        /* 4921 */
        mplew.write(chr.getGender());

        /* 4923 */
        return mplew.getPacket();

    }






    public static byte[] achievementRatio(int amount) {
        /* 4930 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4931 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4933 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4935 */
        mplew.writeShort(SendPacketOpcode.ACHIEVEMENT_RATIO.getValue());
        /* 4936 */
        mplew.writeInt(amount);

        /* 4938 */
        return mplew.getPacket();

    }






    public static byte[] createUltimate(int amount) {
        /* 4945 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4946 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4948 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();






        /* 4955 */
        mplew.writeShort(SendPacketOpcode.CREATE_ULTIMATE.getValue());
        /* 4956 */
        mplew.writeInt(amount);

        /* 4958 */
        return mplew.getPacket();

    }



    public static byte[] updateSpecialStat(String stat, int array, int mode, boolean unk, int chance) {
        /* 4962 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4963 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4965 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();











        /* 4977 */
        mplew.writeShort(SendPacketOpcode.PROFESSION_INFO.getValue());
        /* 4978 */
        mplew.writeMapleAsciiString(stat);
        /* 4979 */
        mplew.writeInt(array);
        /* 4980 */
        mplew.writeInt(mode);
        /* 4981 */
        mplew.write(unk ? 1 : 0);
        /* 4982 */
        mplew.writeInt(chance);

        /* 4984 */
        return mplew.getPacket();

    }



    public static byte[] getQuickSlot(MapleQuickSlot quickslot) {
        /* 4988 */
        if (ServerConfig.DEBUG_MODE) {
            /* 4989 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 4991 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 4993 */
        mplew.writeShort(SendPacketOpcode.QUICK_SLOT.getValue());
        /* 4994 */
        quickslot.writeData(mplew);

        /* 4996 */
        return mplew.getPacket();

    }



    public static byte[] updateImp(MapleImp imp, int mask, int index, boolean login) {
        /* 5000 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5001 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5003 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5005 */
        mplew.writeShort(SendPacketOpcode.ITEM_POT.getValue());
        /* 5006 */
        mplew.write(login ? 0 : 1);
        /* 5007 */
        mplew.writeInt(index + 1);
        /* 5008 */
        mplew.writeInt(mask);
        /* 5009 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0) {
            /* 5010 */
            Pair<Integer, Integer> i = MapleItemInformationProvider.getInstance().getPot(imp.getItemId());
            /* 5011 */
            if (i == null) {
                /* 5012 */
                return enableActions();

            }
            /* 5014 */
            mplew.writeInt(((Integer) i.left).intValue());
            /* 5015 */
            mplew.write(imp.getLevel());

        }
        /* 5017 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.STATE.getValue()) != 0) {
            /* 5018 */
            mplew.write(imp.getState());

        }
        /* 5020 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.FULLNESS.getValue()) != 0) {
            /* 5021 */
            mplew.writeInt(imp.getFullness());

        }
        /* 5023 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.CLOSENESS.getValue()) != 0) {
            /* 5024 */
            mplew.writeInt(imp.getCloseness());

        }
        /* 5026 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.CLOSENESS_LEFT.getValue()) != 0) {
            /* 5027 */
            mplew.writeInt(1);

        }
        /* 5029 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.MINUTES_LEFT.getValue()) != 0) {
            /* 5030 */
            mplew.writeInt(0);

        }
        /* 5032 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.LEVEL.getValue()) != 0) {
            /* 5033 */
            mplew.write(1);

        }
        /* 5035 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.FULLNESS_2.getValue()) != 0) {
            /* 5036 */
            mplew.writeInt(imp.getFullness());

        }
        /* 5038 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.UPDATE_TIME.getValue()) != 0) {
            /* 5039 */
            mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));

        }
        /* 5041 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.CREATE_TIME.getValue()) != 0) {
            /* 5042 */
            mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));

        }
        /* 5044 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.AWAKE_TIME.getValue()) != 0) {
            /* 5045 */
            mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));

        }
        /* 5047 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.SLEEP_TIME.getValue()) != 0) {
            /* 5048 */
            mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));

        }
        /* 5050 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.MAX_CLOSENESS.getValue()) != 0) {
            /* 5051 */
            mplew.writeInt(100);

        }
        /* 5053 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.MAX_DELAY.getValue()) != 0) {
            /* 5054 */
            mplew.writeInt(1000);

        }
        /* 5056 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.MAX_FULLNESS.getValue()) != 0) {
            /* 5057 */
            mplew.writeInt(1000);

        }
        /* 5059 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.MAX_ALIVE.getValue()) != 0) {
            /* 5060 */
            mplew.writeInt(1);

        }
        /* 5062 */
        if ((mask & ImpFlag.SUMMONED.getValue()) != 0 || (mask & ImpFlag.MAX_MINUTES.getValue()) != 0) {
            /* 5063 */
            mplew.writeInt(10);

        }
        /* 5065 */
        mplew.write(0);

        /* 5067 */
        return mplew.getPacket();

    }



    public static byte[] spawnFlags(List<Pair<String, Integer>> flags) {
        /* 5071 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5073 */
        mplew.writeShort(SendPacketOpcode.LOGIN_WELCOME.getValue());
        /* 5074 */
        mplew.write((flags == null) ? 0 : flags.size());
        /* 5075 */
        if (flags != null) {
            /* 5076 */
            for (Pair<String, Integer> f : flags) {
                /* 5077 */
                mplew.writeMapleAsciiString((String) f.left);
                /* 5078 */
                mplew.write(((Integer) f.right).intValue());

            }

        }

        /* 5082 */
        return mplew.getPacket();

    }



    public static byte[] showStatusMessage(String info, String data) {
        /* 5086 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5087 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5089 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5091 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5092 */
        mplew.write(ServerConstants.MapleStatusInfo.系统灰字公告.getType());
        /* 5093 */
        mplew.writeMapleAsciiString(info);
        /* 5094 */
        mplew.writeMapleAsciiString(data);

        /* 5096 */
        return mplew.getPacket();

    }



    public static byte[] changeTeam(int cid, int type) {
        /* 5100 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5101 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5103 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5105 */
        mplew.writeShort(SendPacketOpcode.LOAD_TEAM.getValue());
        /* 5106 */
        mplew.writeInt(cid);
        /* 5107 */
        mplew.write(type);

        /* 5109 */
        return mplew.getPacket();

    }






    public static byte[] showQuickMove(MapleCharacter chr) {
        /* 5116 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5118 */
        mplew.writeShort(SendPacketOpcode.QUICK_MOVE.getValue());
        /* 5119 */
        List<MapleQuickMove> quickMove = MapleQuickMove.getQuickMove(chr.getMapId());
        /* 5120 */
        mplew.write(quickMove.size());
        /* 5121 */
        int i = 0;
        /* 5122 */
        for (MapleQuickMove map : quickMove) {
            /* 5123 */
            mplew.writeShort(i);
            /* 5124 */
            mplew.writeMapleAsciiString(map.name);
            /* 5125 */
            mplew.writeInt(map.npcid);
            /* 5126 */
            mplew.writeInt(map.type);
            /* 5127 */
            mplew.writeInt(map.level);
            /* 5128 */
            mplew.writeMapleAsciiString(map.desc);
            /* 5129 */
            mplew.writeLong(PacketHelper.getTime(-2L));
            /* 5130 */
            mplew.writeLong(PacketHelper.getTime(-1L));
            /* 5131 */
            i++;

        }

        /* 5134 */
        return mplew.getPacket();

    }




    public static byte[] updateCardStack(int total) {
        /* 5139 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5141 */
        mplew.writeShort(SendPacketOpcode.SHOW_CARTE.getValue());
        /* 5142 */
        mplew.write(0);
        /* 5143 */
        mplew.write(total);

        /* 5145 */
        return mplew.getPacket();

    }







































































































    public static byte[] 美洲豹攻击效果(int skillid) {
        /* 5249 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5251 */
        mplew.writeShort(SendPacketOpcode.PANTHER_ATTACK.getValue());
        /* 5252 */
        mplew.writeInt(skillid);

        /* 5254 */
        return mplew.getPacket();

    }



    public static byte[] openPantherAttack(boolean on) {
        /* 5258 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5260 */
        mplew.writeShort(SendPacketOpcode.OPEN_PANTHER_ATTACK.getValue());
        /* 5261 */
        mplew.writeBool(on);

        /* 5263 */
        return mplew.getPacket();

    }




    public static byte[] showRedNotice(String msg) {
        /* 5268 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5269 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5271 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5273 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5274 */
        mplew.write(ServerConstants.MapleStatusInfo.系统红字公告.getType());
        /* 5275 */
        mplew.writeMapleAsciiString(msg);

        /* 5277 */
        return mplew.getPacket();

    }



    public static byte[] sendloginSuccess() {
        /* 5281 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5283 */
        mplew.writeShort(SendPacketOpcode.LOGIN_SUCC.getValue());

        /* 5285 */
        return mplew.getPacket();

    }



    public static byte[] showCharCash(MapleCharacter chr) {
        /* 5289 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5291 */
        mplew.writeShort(SendPacketOpcode.CHAR_CASH.getValue());
        /* 5292 */
        mplew.writeInt(chr.getId());
        /* 5293 */
        mplew.writeInt(chr.getCSPoints(2));

        /* 5295 */
        return mplew.getPacket();

    }



    public static byte[] showPlayerCash(MapleCharacter chr) {
        /* 5299 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5301 */
        mplew.writeShort(SendPacketOpcode.SHOW_PLAYER_CASH.getValue());
        /* 5302 */
        mplew.writeInt(chr.getCSPoints(1));
        /* 5303 */
        mplew.writeInt(chr.getCSPoints(2));

        /* 5305 */
        return mplew.getPacket();

    }



    public static byte[] playerCashUpdate(int mode, int toCharge, MapleCharacter chr) {
        /* 5309 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5311 */
        mplew.writeShort(SendPacketOpcode.PLAYER_CASH_UPDATE.getValue());
        /* 5312 */
        mplew.writeInt(mode);
        /* 5313 */
        mplew.writeInt((toCharge == 1) ? chr.getCSPoints(1) : 0);
        /* 5314 */
        mplew.writeInt(chr.getCSPoints(2));
        /* 5315 */
        mplew.write(toCharge);
        /* 5316 */
        mplew.write(0);
        /* 5317 */
        mplew.write(0);

        /* 5319 */
        return mplew.getPacket();

    }



    public static byte[] playerSoltUpdate(int itemid, int acash, int mpoints) {
        /* 5323 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5325 */
        mplew.writeShort(SendPacketOpcode.SHOW_CHARSOLE.getValue());

        /* 5327 */
        mplew.writeInt(itemid);
        /* 5328 */
        mplew.writeInt(acash);
        /* 5329 */
        mplew.writeInt(mpoints);
        /* 5330 */
        mplew.write(1);
        /* 5331 */
        mplew.writeShort(0);

        /* 5333 */
        return mplew.getPacket();

    }



    public static byte[] sendTestPacket(String test) {
        /* 5337 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 5338 */
        mplew.write(HexTool.getByteArrayFromHexString(test));
        /* 5339 */
        return mplew.getPacket();

    }



    public static byte[] GainEXP_Monster(String testmsg) {
        /* 5343 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5344 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5346 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 5347 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5348 */
        mplew.write(ServerConstants.MapleStatusInfo.获得经验.getType());
        /* 5349 */
        mplew.write(1);
        /* 5350 */
        mplew.writeInt(1000);
        /* 5351 */
        mplew.write(0);

        /* 5353 */
        mplew.writeInt(0);
        /* 5354 */
        mplew.writeShort(0);
        /* 5355 */
        mplew.writeInt(0);
        /* 5356 */
        mplew.writeInt(0);
        /* 5357 */
        mplew.write(0);
        /* 5358 */
        mplew.writeInt(0);
        /* 5359 */
        mplew.writeInt(0);
        /* 5360 */
        mplew.writeInt(0);
        /* 5361 */
        mplew.writeInt(0);
        /* 5362 */
        mplew.writeInt(0);
        /* 5363 */
        mplew.writeInt(0);
        /* 5364 */
        mplew.writeInt(0);
        /* 5365 */
        mplew.writeInt(0);
        /* 5366 */
        mplew.writeInt(0);
        /* 5367 */
        mplew.writeInt(0);
        /* 5368 */
        mplew.writeInt(0);
        /* 5369 */
        mplew.writeInt(0);


        /* 5372 */
        return mplew.getPacket();

    }






    public static byte[] UpdateLinkSkillResult(int skillId, int mode) {
        /* 5379 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5381 */
        mplew.writeShort(SendPacketOpcode.UPDATE_LINKSKILL_RESULT.getValue());
        /* 5382 */
        mplew.writeInt(skillId);
        /* 5383 */
        mplew.writeInt(mode);

        /* 5385 */
        return mplew.getPacket();

    }



    public static final byte[] DeleteLinkSkillResult(Map<Integer, Integer> map) {
        /* 5389 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5391 */
        mplew.writeShort(SendPacketOpcode.DELETE_LINKSKILL_RESULT.getValue());
        /* 5392 */
        mplew.writeInt(map.size());
        /* 5393 */
        for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
            /* 5394 */
            mplew.writeInt(((Integer) entry.getKey()).intValue());
            /* 5395 */
            mplew.writeInt(((Integer) entry.getValue()).intValue());

        }
        /* 5397 */
        return mplew.getPacket();

    }



    public static final byte[] SetLinkSkillResult(int skillId, Pair<Integer, SkillEntry> skillinfo, int linkSkillId, int linkSkillLevel) {
        /* 5401 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5403 */
        mplew.writeShort(SendPacketOpcode.SET_LINKSKILL_RESULT.getValue());
        /* 5404 */
        PacketHelper.writeSonOfLinkedSkill(mplew, skillId, skillinfo);
        /* 5405 */
        mplew.writeInt(linkSkillId);
        /* 5406 */
        if (linkSkillId > 0) {
            /* 5407 */
            mplew.writeInt(linkSkillLevel);

        }
        /* 5409 */
        return mplew.getPacket();

    }






    public static byte[] getMulungRanking(byte type) {
        /* 5416 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5418 */
        mplew.writeShort(SendPacketOpcode.MULUNG_DOJO_RANKING.getValue());
        /* 5419 */
        DojoRankingsData data = DojoRankingsData.loadLeaderboard();
        /* 5420 */
        mplew.write(type);
        /* 5421 */
        mplew.writeInt(data.totalCharacters);
        /* 5422 */
        for (int i = 0; i < data.totalCharacters; i++) {
            /* 5423 */
            mplew.writeShort(data.ranks[i]);
            /* 5424 */
            mplew.writeMapleAsciiString(data.names[i]);
            /* 5425 */
            mplew.writeLong(data.times[i]);

        }
        /* 5427 */
        return mplew.getPacket();

    }






    public static byte[] getMulungMessage(boolean dc, String msg) {
        /* 5434 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5436 */
        mplew.writeShort(SendPacketOpcode.MULUNG_MESSAGE.getValue());
        /* 5437 */
        mplew.write(dc ? 1 : 0);
        /* 5438 */
        mplew.writeMapleAsciiString(msg);

        /* 5440 */
        return mplew.getPacket();

    }















    public static byte[] confirmCrossHunter(byte code) {
        /* 5456 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5458 */
        mplew.writeShort(SendPacketOpcode.CONFIRM_CROSS_HUNTER.getValue());







        /* 5466 */
        mplew.write(code);

        /* 5468 */
        return mplew.getPacket();

    }






    public static byte[] openWeb(String web) {
        /* 5475 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5477 */
        mplew.writeShort(SendPacketOpcode.OPEN_WEB.getValue());
        /* 5478 */
        mplew.writeMapleAsciiString(web);

        /* 5480 */
        return mplew.getPacket();

    }








    public static byte[] updateInnerSkill(int skillId, int skillevel, byte position, byte rank) {
        /* 5489 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5491 */
        mplew.writeShort(SendPacketOpcode.UPDATE_INNER_SKILL.getValue());
        /* 5492 */
        mplew.write(1);
        /* 5493 */
        mplew.write(1);
        /* 5494 */
        mplew.writeShort((short) position);
        /* 5495 */
        mplew.writeInt(skillId);
        /* 5496 */
        mplew.writeShort(skillevel);
        /* 5497 */
        mplew.writeShort((short) rank);
        /* 5498 */
        mplew.write(1);

        /* 5500 */
        return mplew.getPacket();

    }








    public static byte[] updateInnerStats(MapleCharacter chr) {
        /* 5509 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5511 */
        mplew.writeShort(SendPacketOpcode.UPDATE_INNER_STATS.getValue());
        /* 5512 */
        mplew.writeInt(chr.getHonor());

        /* 5514 */
        return mplew.getPacket();

    }







    public static byte[] sendPolice(String text) {
        /* 5522 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5524 */
        mplew.writeShort(SendPacketOpcode.MAPLE_ADMIN.getValue());
        /* 5525 */
        mplew.writeMapleAsciiString(text);

        /* 5527 */
        return mplew.getPacket();

    }






    public static byte[] showChronosphere(int mf, int cs) {
        /* 5534 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5536 */
        mplew.writeShort(SendPacketOpcode.DAY_OF_CHRONOSPHERE.getValue());
        /* 5537 */
        mplew.writeInt(30 - mf);
        /* 5538 */
        mplew.writeInt(cs);

        /* 5540 */
        return mplew.getPacket();

    }







    public static byte[] errorChronosphere() {
        /* 5548 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5550 */
        mplew.writeShort(SendPacketOpcode.ERROR_CHRONOSPHERE.getValue());
        /* 5551 */
        mplew.write(0);

        /* 5553 */
        return mplew.getPacket();

    }



    public static byte[] testPacket(String testmsg) {
        /* 5557 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5559 */
        mplew.write(HexTool.getByteArrayFromHexString(testmsg));

        /* 5561 */
        return mplew.getPacket();

    }



    public static byte[] testPacket(byte[] testmsg) {
        /* 5565 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5567 */
        mplew.write(testmsg);

        /* 5569 */
        return mplew.getPacket();

    }



    public static byte[] testPacket(String op, String text) {
        /* 5573 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5575 */
        mplew.write(HexTool.getByteArrayFromHexString(op));
        /* 5576 */
        mplew.writeMapleAsciiString(text);

        /* 5578 */
        return mplew.getPacket();

    }






    public static byte[] 封印之瞳(MapleCharacter chr, List<Integer> memorySkills) {
        /* 5585 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5586 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5588 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5590 */
        mplew.writeShort(SendPacketOpcode.SKILL_MEMORY.getValue());
        /* 5591 */
        mplew.write(1);
        /* 5592 */
        mplew.writeInt(chr.getId());
        /* 5593 */
        mplew.writeInt(4);
        /* 5594 */
        chr.writeJobData(mplew);
        /* 5595 */
        mplew.writeInt(memorySkills.size());
        /* 5596 */
        for (Iterator<Integer> iterator = memorySkills.iterator(); iterator.hasNext(); ) {
            int i = ((Integer) iterator.next()).intValue();
            /* 5597 */
            mplew.writeInt(i);
        }


        /* 5600 */
        return mplew.getPacket();

    }













    public static byte[] 幻影删除技能(int position) {
        /* 5614 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5615 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5617 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5619 */
        mplew.writeShort(SendPacketOpcode.UPDATE_SKILL_TICK.getValue());
        /* 5620 */
        mplew.write(1);
        /* 5621 */
        mplew.write(3);
        /* 5622 */
        if (position < 4) {
            /* 5623 */
            mplew.writeInt(1);
            /* 5624 */
            mplew.writeInt(position);
            /* 5625 */
        } else if (position >= 4 && position < 8) {
            /* 5626 */
            mplew.writeInt(2);
            /* 5627 */
            mplew.writeInt(position - 4);
            /* 5628 */
        } else if (position >= 8 && position < 11) {
            /* 5629 */
            mplew.writeInt(3);
            /* 5630 */
            mplew.writeInt(position - 8);
            /* 5631 */
        } else if (position >= 11 && position < 13) {
            /* 5632 */
            mplew.writeInt(4);
            /* 5633 */
            mplew.writeInt(position - 11);

        }

        /* 5636 */
        return mplew.getPacket();

    }



    public static byte[] 修改幻影装备技能(int skillId, int teachId) {
        /* 5640 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5641 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5643 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5645 */
        mplew.writeShort(SendPacketOpcode.EQUIPPED_SKILL.getValue());
        /* 5646 */
        mplew.write(1);
        /* 5647 */
        mplew.write(1);
        /* 5648 */
        mplew.writeInt(skillId);
        /* 5649 */
        mplew.writeInt(teachId);

        /* 5651 */
        return mplew.getPacket();

    }



    public static byte[] 幻影复制错误() {
        /* 5655 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5656 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5658 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5660 */
        mplew.writeShort(SendPacketOpcode.UPDATE_SKILL_TICK.getValue());
        /* 5661 */
        mplew.write(1);
        /* 5662 */
        mplew.write(1);

        /* 5664 */
        return mplew.getPacket();

    }



    public static byte[] 幻影复制技能(int position, int skillId, int level) {
        /* 5668 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5669 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5671 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5673 */
        mplew.writeShort(SendPacketOpcode.UPDATE_SKILL_TICK.getValue());
        /* 5674 */
        mplew.write(1);
        /* 5675 */
        mplew.write(0);
        /* 5676 */
        if (position < 4) {
            /* 5677 */
            mplew.writeInt(1);
            /* 5678 */
            mplew.writeInt(position);
            /* 5679 */
        } else if (position >= 4 && position < 8) {
            /* 5680 */
            mplew.writeInt(2);
            /* 5681 */
            mplew.writeInt(position - 4);
            /* 5682 */
        } else if (position >= 8 && position < 11) {
            /* 5683 */
            mplew.writeInt(3);
            /* 5684 */
            mplew.writeInt(position - 8);
            /* 5685 */
        } else if (position >= 11 && position < 13) {
            /* 5686 */
            mplew.writeInt(4);
            /* 5687 */
            mplew.writeInt(position - 11);

        }
        /* 5689 */
        mplew.writeInt(skillId);
        /* 5690 */
        mplew.writeInt(level);
        /* 5691 */
        mplew.writeInt(0);

        /* 5693 */
        return mplew.getPacket();

    }







    public static byte[] sendUnkPacket1FC() {
        /* 5701 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5703 */
        mplew.writeShort(SendPacketOpcode.CHAR_REQUEST.getValue());
        /* 5704 */
        mplew.write(1);

        /* 5706 */
        return mplew.getPacket();

    }



    public static byte[] SystemProcess() {
        /* 5710 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5712 */
        mplew.writeShort(SendPacketOpcode.SYSTEM_PROCESS_LIST.getValue());
        /* 5713 */
        mplew.write(1);

        /* 5715 */
        return mplew.getPacket();

    }






    public static byte[] showContinuityKill(boolean top, int exp, int kills, int moboid) {
        /* 5722 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5723 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5725 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5727 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5728 */
        mplew.write(ServerConstants.MapleStatusInfo.连续击杀.getType());
        /* 5729 */
        mplew.write(top ? 0 : 1);
        /* 5730 */
        if (top) {
            /* 5731 */
            mplew.writeLong(exp);

        }
        /* 5733 */
        mplew.writeInt(kills);
        /* 5734 */
        if (!top) {
            /* 5735 */
            mplew.writeInt(moboid);

        }
        /* 5737 */
        mplew.writeInt(kills);
        /* 5738 */
        mplew.writeInt(3);

        /* 5740 */
        return mplew.getPacket();

    }



    public static byte[] showGainVictoryEffect(long VictoryExp, int VictoryNum, int Victoryoid) {
        /* 5744 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5745 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5747 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5749 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5750 */
        mplew.write(34);
        /* 5751 */
        mplew.write(1);
        /* 5752 */
        mplew.writeLong(VictoryExp);
        /* 5753 */
        mplew.writeInt(VictoryNum);
        /* 5754 */
        mplew.writeInt(Victoryoid);

        /* 5756 */
        return mplew.getPacket();

    }



    public static byte[] showVictoryEffect(int Victorynum, long VictoryExp) {
        /* 5760 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5761 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5763 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5765 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5766 */
        mplew.writeShort(34);
        /* 5767 */
        mplew.writeLong(VictoryExp);
        /* 5768 */
        mplew.writeInt(Victorynum);
        /* 5769 */
        return mplew.getPacket();

    }



    public static byte[] showGainWeaponPoint(int gainwp) {
        /* 5773 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5774 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 5776 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5778 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 5779 */
        mplew.writeShort((short) ServerConstants.MapleStatusInfo.获得WP.getType());
        /* 5780 */
        mplew.writeInt(gainwp);

        /* 5782 */
        return mplew.getPacket();

    }



    public static byte[] updateWeaponPoint(int wp) {
        /* 5786 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5788 */
        mplew.writeShort(SendPacketOpcode.UPDATA_WP.getValue());
        /* 5789 */
        mplew.writeInt(wp);

        /* 5791 */
        return mplew.getPacket();

    }











    public static byte[] showHPEffect(int chrId, int skillid, int effectid) {
        /* 5803 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5804 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 5806 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5808 */
        mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
        /* 5809 */
        mplew.writeInt(chrId);
        /* 5810 */
        mplew.write(effectid);
        /* 5811 */
        mplew.writeInt(skillid);
        /* 5812 */
        mplew.write(10);
        /* 5813 */
        mplew.write(11);
        /* 5814 */
        mplew.write(2);
        /* 5815 */
        mplew.writeShort(0);

        /* 5817 */
        return mplew.getPacket();

    }






























    public static byte[] ExtraAttack(int tick, int facingLeft, int skillid, int finalskillid, int weapon) {
        /* 5848 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 5849 */
        mplew.writeShort(SendPacketOpcode.EXTRA_ATTACK.getValue());
        /* 5850 */
        mplew.writeInt(tick);
        /* 5851 */
        mplew.writeInt(facingLeft);
        /* 5852 */
        mplew.writeInt(skillid);
        /* 5853 */
        mplew.writeInt(finalskillid);
        /* 5854 */
        mplew.writeInt(weapon);
        /* 5855 */
        return mplew.getPacket();

    }



    public static byte[] SummonEnergy1(short type, int id, int mapid, int oid, int Type, Point Spos, Point toPos, int Tiem, int skillid, int skilllevel, int s2) {
        /* 5859 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 5860 */
        mplew.writeShort(SendPacketOpcode.CANNON_PLATE.getValue());
        /* 5861 */
        mplew.writeShort(type);
        /* 5862 */
        mplew.writeInt(id);
        /* 5863 */
        mplew.writeInt(mapid);
        /* 5864 */
        mplew.writeShort(1);
        /* 5865 */
        mplew.writeInt(oid);
        /* 5866 */
        mplew.writeShort(Type);
        /* 5867 */
        mplew.writePos(Spos);
        /* 5868 */
        if (Type == 5) {
            /* 5869 */
            mplew.writePos(toPos);

        }
        /* 5871 */
        mplew.writeShort(s2);
        /* 5872 */
        mplew.writeInt(Tiem);
        /* 5873 */
        mplew.writeShort(s2);
        /* 5874 */
        mplew.writeInt(skillid);
        /* 5875 */
        mplew.writeShort(skilllevel);
        /* 5876 */
        mplew.write(0);
        /* 5877 */
        return mplew.getPacket();

    }



    public static byte[] SummonEnergy2(int type, int cid, int mapid, int s1, int s2, int skillid) {
        /* 5881 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 5882 */
        mplew.writeShort(SendPacketOpcode.CANNON_PLATE.getValue());
        /* 5883 */
        mplew.writeShort(type);
        /* 5884 */
        mplew.writeInt(cid);
        /* 5885 */
        mplew.writeInt(mapid);
        /* 5886 */
        mplew.writeInt(cid);
        /* 5887 */
        mplew.writeInt(skillid);
        /* 5888 */
        mplew.writeInt(s1);
        /* 5889 */
        mplew.writeInt(s2);

        /* 5891 */
        return mplew.getPacket();

    }



    public static byte[] openWorldMap() {
        /* 5895 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5897 */
        mplew.writeShort(SendPacketOpcode.VIEW_WORLDMAP.getValue());
        /* 5898 */
        mplew.writeInt(0);
        /* 5899 */
        return mplew.getPacket();

    }







    public static byte[] skillActive() {
        /* 5907 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5909 */
        mplew.writeShort(SendPacketOpcode.SKILL_ACTIVE.getValue());

        /* 5911 */
        return mplew.getPacket();

    }



    public static byte[] skillNotActive(int skillId) {
        /* 5915 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5917 */
        mplew.writeShort(SendPacketOpcode.SKILL_NOT_ACTIVE.getValue());
        /* 5918 */
        mplew.writeInt(skillId);

        /* 5920 */
        return mplew.getPacket();

    }



    public static byte[] updateJianQi(int jianqi) {
        /* 5924 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5926 */
        mplew.writeShort(SendPacketOpcode.JIANQI_POINTS.getValue());
        /* 5927 */
        mplew.writeShort(jianqi);

        /* 5929 */
        return mplew.getPacket();

    }



    public static byte[] sendCritAttack() {
        /* 5933 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5935 */
        mplew.writeShort(SendPacketOpcode.CRIT_STATUS.getValue());

        /* 5937 */
        return mplew.getPacket();

    }



    public static byte[] updateSoulEffect(int chrid, boolean open) {
        /* 5941 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5943 */
        mplew.writeShort(SendPacketOpcode.SOUL_MODE.getValue());

        /* 5945 */
        mplew.writeInt(chrid);
        /* 5946 */
        mplew.writeBool(open);

        /* 5948 */
        return mplew.getPacket();

    }



    public static byte[] spawnRune(MapleRune rune, boolean respawn) {
        /* 5952 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5954 */
        mplew.writeShort(respawn ? SendPacketOpcode.RESPAWN_RUNE.getValue() : SendPacketOpcode.SPAWN_RUNE.getValue());
        /* 5955 */
        mplew.writeInt(respawn ? 0 : 1);
        /* 5956 */
        mplew.writeInt(0);
        /* 5957 */
        mplew.writeInt(rune.getRuneType());
        /* 5958 */
        mplew.writeInt((rune.getPosition()).x);
        /* 5959 */
        mplew.writeInt((rune.getPosition()).y);
        /* 5960 */
        mplew.write(0);

        /* 5962 */
        return mplew.getPacket();

    }



    public static byte[] removeRune(MapleRune rune) {
        /* 5966 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5968 */
        mplew.writeShort(SendPacketOpcode.REMOVE_RUNE.getValue());
        /* 5969 */
        mplew.writeInt(0);
        /* 5970 */
        mplew.writeInt(rune.getObjectId());
        /* 5971 */
        mplew.writeInt(200);
        /* 5972 */
        mplew.write(0);

        /* 5974 */
        return mplew.getPacket();

    }



    public static byte[] RuneAction(int type, int time) {
        /* 5978 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5980 */
        mplew.writeShort(SendPacketOpcode.RUNE_ACTION.getValue());
        /* 5981 */
        mplew.writeInt(type);
        /* 5982 */
        mplew.writeInt(time);

        /* 5984 */
        return mplew.getPacket();

    }



    public static byte[] showRuneEffect(int type) {
        /* 5988 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 5990 */
        mplew.writeShort(SendPacketOpcode.RUNE_EFFECT.getValue());
        /* 5991 */
        mplew.writeInt(type);

        /* 5993 */
        return mplew.getPacket();

    }




    public static byte[] pamsSongEffect(int chrId) {
        /* 5998 */
        if (ServerConfig.DEBUG_MODE) {
            /* 5999 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 6001 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6003 */
        mplew.writeShort(SendPacketOpcode.PAMS_SONG.getValue());
        /* 6004 */
        mplew.writeInt(chrId);

        /* 6006 */
        return mplew.getPacket();

    }



    public static byte[] pamsSongUI() {
        /* 6010 */
        if (ServerConfig.DEBUG_MODE) {
            /* 6011 */
            log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());

        }
        /* 6013 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6015 */
        mplew.writeShort(SendPacketOpcode.PAMS_SONG.getValue());
        /* 6016 */
        mplew.writeShort(0);

        /* 6018 */
        return mplew.getPacket();

    }



    public static byte[] startBattleStatistics() {
        /* 6022 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6024 */
        mplew.writeShort(SendPacketOpcode.BATTLE_STATISTICS.getValue());
        /* 6025 */
        mplew.write(1);

        /* 6027 */
        return mplew.getPacket();

    }















    public static byte[] updateDamageSkin(MapleCharacter player, int type) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.DAMSKIN_OPERATION.getValue());
        mplew.write(type);
        mplew.write(4);
        writeDamageSkinData(mplew, player);
        return mplew.getPacket();
    }











    public static void writeDamageSkinData(MaplePacketLittleEndianWriter mplew, MapleCharacter player) {
        /* 6068 */
        mplew.write(1);
        /* 6069 */
        String customData = player.getQuestNAdd(MapleQuest.getInstance(7291)).getCustomData();
        /* 6070 */
        mplew.writeInt((customData == null) ? 0 : Integer.valueOf(customData).intValue());
        /* 6071 */
        int itemId = MapleItemInformationProvider.getInstance().getDamageSkinId(player.getDamageSkin());
        /* 6072 */
        mplew.writeInt(itemId);
        /* 6073 */
        mplew.write(0);
        /* 6074 */
        mplew.writeMapleAsciiString("");
        /* 6075 */
        mplew.writeInt(0);
        /* 6076 */
        mplew.writeInt(-1);
        /* 6077 */
        mplew.writeInt(0);
        /* 6078 */
        mplew.write(1);
        /* 6079 */
        mplew.writeShort(0);
        /* 6080 */
        mplew.writeShort(0);
        /* 6081 */
        mplew.writeShort(0);
        /* 6082 */
        mplew.writeShort(Integer.valueOf(player.getKeyValue("DAMAGE_SKIN_SLOT")).intValue());
        /* 6083 */
        mplew.writeShort(player.getDamSkinList().size());
        /* 6084 */
        for (Integer i : player.getDamSkinList()) {
            /* 6085 */
            mplew.writeInt(i.intValue());
            /* 6086 */
            itemId = MapleItemInformationProvider.getInstance().getDamageSkinId(i.intValue());
            /* 6087 */
            mplew.writeInt(itemId);
            /* 6088 */
            mplew.write(0);
            /* 6089 */
            mplew.writeMapleAsciiString("");
            /* 6090 */
            mplew.writeInt(0);

        }

    }




    public static byte[] changeHour(int n1, int n2) {
        /* 6096 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6098 */
        mplew.writeShort(SendPacketOpcode.HOURCHANGED.getValue());
        /* 6099 */
        mplew.writeShort(n1);
        /* 6100 */
        mplew.writeShort(n2);

        /* 6102 */
        return mplew.getPacket();

    }












    public static byte[] createObtacleAtom(int count, int type1, int type2, MapleMap map) {
        /* 6115 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6117 */
        mplew.writeShort(SendPacketOpcode.CREATE_OBTACLEATOM.getValue());
        /* 6118 */
        mplew.writeInt(0);
        /* 6119 */
        mplew.writeInt(count);
        /* 6120 */
        mplew.write(0);
        /* 6121 */
        int n5 = Randomizer.nextInt(200000);
        /* 6122 */
        for (int i2 = 0; i2 < count; i2++) {
            /* 6123 */
            MapleFoothold foothold = map.getFootholds().getAllRelevants().get(Randomizer.nextInt(map.getFootholds().getAllRelevants().size()));
            /* 6124 */
            int n6 = foothold.getY2();
            /* 6125 */
            int n7 = Randomizer.rand(map.getLeft(), map.getRight());
            /* 6126 */
            Point point = map.calcPointBelow(new Point(n7, n6));
            /* 6127 */
            if (point == null) {
                /* 6128 */
                point = new Point(n7, n6);

            }
            /* 6130 */
            mplew.write(1);
            /* 6131 */
            mplew.writeInt(Randomizer.rand(type1, type2));
            /* 6132 */
            mplew.writeInt(n5 + i2);
            /* 6133 */
            mplew.writeInt((int) point.getX());
            /* 6134 */
            mplew.writeInt(map.getTop());
            /* 6135 */
            mplew.writeInt((int) point.getX());
            /* 6136 */
            mplew.writeInt(Math.abs(map.getTop() - (int) point.getY()));
            /* 6137 */
            mplew.writeInt(Randomizer.rand(25, 37));
            /* 6138 */
            mplew.writeInt(Randomizer.rand(10, 15));
            /* 6139 */
            mplew.writeInt(0);
            /* 6140 */
            mplew.writeInt(Randomizer.rand(500, 1300));
            /* 6141 */
            mplew.writeInt(0);
            /* 6142 */
            mplew.writeInt(Randomizer.rand(10, 173));
            /* 6143 */
            mplew.writeInt(Randomizer.rand(1, 4));
            /* 6144 */
            mplew.writeInt(Math.abs(map.getTop() - (int) point.getY()));
            /* 6145 */
            mplew.writeInt(0);

        }
        /* 6147 */
        return mplew.getPacket();

    }



    public static byte[] sendMarriedBefore(int n2, int n3) {
        /* 6151 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6153 */
        mplew.writeShort(SendPacketOpcode.WEDDING_PROGRESS.getValue());
        /* 6154 */
        mplew.writeInt(n2);
        /* 6155 */
        mplew.writeInt(n3);

        /* 6157 */
        return mplew.getPacket();

    }



    public static byte[] sendMarriedDone() {
        /* 6161 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6163 */
        mplew.writeShort(SendPacketOpcode.WEDDING_CREMONY_END.getValue());

        /* 6165 */
        return mplew.getPacket();

    }



    public static byte[] showVisitorResult(int type) {
        /* 6169 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6171 */
        mplew.writeShort(SendPacketOpcode.SHOW_VISITOR_RESULT.getValue());
        /* 6172 */
        mplew.writeShort(type);
        /* 6173 */
        mplew.writeShort(0);

        /* 6175 */
        return mplew.getPacket();

    }



    public static byte[] updateVisitorKills(int n2, int n3) {
        /* 6179 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6181 */
        mplew.writeShort(SendPacketOpcode.UPDATE_VISITOR_KILL.getValue());
        /* 6182 */
        mplew.writeShort(n2);
        /* 6183 */
        mplew.writeShort(n3);

        /* 6185 */
        return mplew.getPacket();

    }



    public static byte[] showFieldValue(String str, String act) {
        /* 6189 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6191 */
        mplew.writeShort(SendPacketOpcode.FIELD_VALUE.getValue());
        /* 6192 */
        mplew.writeMapleAsciiString(str);
        /* 6193 */
        mplew.writeMapleAsciiString(act);

        /* 6195 */
        return mplew.getPacket();

    }



    public static byte[] DressUpInfoModified(MapleCharacter player) {
        /* 6199 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6201 */
        mplew.writeShort(SendPacketOpcode.DRESS_UP_INFO_MODIFIED.getValue());
        /* 6202 */
        PacketHelper.writeDressUpInfo(mplew, player);

        /* 6204 */
        return mplew.getPacket();

    }




    public static byte[] UserRequestChangeMobZoneState(String string, List<Point> list) {
        /* 6209 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6211 */
        mplew.writeShort(SendPacketOpcode.CHANGE_MOBZONESTATE_REQUEST.getValue());
        /* 6212 */
        mplew.writeMapleAsciiString(string);
        /* 6213 */
        mplew.writeInt(0);
        /* 6214 */
        mplew.writeInt(list.size());
        /* 6215 */
        list.stream().filter(Objects::nonNull).forEach(point -> {

            mplew.writeInt(point.x);


            mplew.writeInt(point.y);

        });
        /* 6220 */
        return mplew.getPacket();

    }



    public static final byte[] LobbyTimeAction(int n, int n2, int n3, int n4, int n5) {
        /* 6224 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 6225 */
        mplew.writeShort(SendPacketOpcode.LOBBY_TIME_ACTION.getValue());

        /* 6227 */
        mplew.writeInt(n);
        /* 6228 */
        mplew.writeInt(n2);
        /* 6229 */
        mplew.writeInt(n3);
        /* 6230 */
        mplew.writeInt(0);
        /* 6231 */
        mplew.writeInt(n4);
        /* 6232 */
        mplew.writeInt(n5);
        /* 6233 */
        return mplew.getPacket();

    }



    public static final byte[] LobbyTimeAction(int n, int n2, int n3) {
        /* 6237 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6239 */
        mplew.writeShort(SendPacketOpcode.LOBBY_TIME_ACTION.getValue());
        /* 6240 */
        mplew.writeInt(1);
        /* 6241 */
        mplew.writeInt(n);
        /* 6242 */
        mplew.writeInt(n2);
        /* 6243 */
        mplew.writeInt(0);
        /* 6244 */
        mplew.writeInt(n3);
        /* 6245 */
        mplew.writeInt(42011);

        /* 6247 */
        return mplew.getPacket();

    }



    public static byte[] SendGiantBossMap(Map<String, String> map) {
        /* 6251 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6253 */
        mplew.writeShort(SendPacketOpcode.GIANT_BOSS_MAP.getValue());
        /* 6254 */
        mplew.writeInt(map.size());
        /* 6255 */
        for (Map.Entry<String, String> entry : map.entrySet()) {
            /* 6256 */
            mplew.writeMapleAsciiString(entry.getKey());
            /* 6257 */
            mplew.writeMapleAsciiString(entry.getValue());

        }

        /* 6260 */
        return mplew.getPacket();

    }



    public static byte[] ShowPortal(String string, int n2) {
        /* 6264 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6266 */
        mplew.writeShort(SendPacketOpcode.SHOW_PORTAL.getValue());
        /* 6267 */
        mplew.writeMapleAsciiString(string);
        /* 6268 */
        mplew.writeInt(n2);

        /* 6270 */
        return mplew.getPacket();

    }



    public static byte[] IndividualDeathCountInfo(int n2) {
        /* 6274 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6276 */
        mplew.writeShort(SendPacketOpcode.INDIVIDUAL_DEATH_COUNT_INFO.getValue());
        /* 6277 */
        mplew.writeInt(n2);

        /* 6279 */
        return mplew.getPacket();

    }



    public static byte[] cannonSkillResult(int skillid, int type, List<Integer> list) {
        /* 6283 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6285 */
        mplew.writeShort(SendPacketOpcode.CANNON_SKILL_RESULT.getValue());
        /* 6286 */
        mplew.write(1);
        /* 6287 */
        mplew.writeInt(skillid);
        /* 6288 */
        mplew.writeInt(type);
        /* 6289 */
        mplew.writeInt(list.size());
        /* 6290 */
        list.forEach(mplew::writeInt);

        /* 6292 */
        return mplew.getPacket();

    }




    public static byte[] userBonusAttackRequest(int skillid, int value, List<Integer> list) {
        /* 6297 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6299 */
        mplew.writeShort(SendPacketOpcode.USER_BONUS_ATTACK_REQUEST.getValue());
        /* 6300 */
        mplew.writeInt(skillid);
        /* 6301 */
        mplew.writeInt(list.size());
        /* 6302 */
        mplew.write((list.size() > 0) ? 0 : 1);
        /* 6303 */
        mplew.writeInt(0);
        /* 6304 */
        mplew.writeInt(value);
        /* 6305 */
        for (Integer n4 : list) {
            /* 6306 */
            mplew.writeInt(n4.intValue());
            /* 6307 */
            mplew.writeInt(0);
            /* 6308 */
            if (skillid == 400041030) {
                /* 6309 */
                mplew.writeInt(0);

            }

        }

        /* 6313 */
        return mplew.getPacket();

    }



    public static byte[] SkillFeed() {
        /* 6317 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6319 */
        mplew.writeShort(SendPacketOpcode.SKILL_FEED.getValue());
        /* 6320 */
        mplew.writeInt(1);
        /* 6321 */
        mplew.write(1);

        /* 6323 */
        return mplew.getPacket();

    }



    public static byte[] RegisterExtraSkill(MapleCharacter chr, int skill, int extraSkill) {
        /* 6327 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6329 */
        mplew.writeShort(SendPacketOpcode.REGISTER_EXTRA_SKILL.getValue());
        /* 6330 */
        mplew.writeInt((chr.getTruePosition()).x);
        /* 6331 */
        mplew.writeInt((chr.getTruePosition()).y);
        /* 6332 */
        mplew.writeShort(1);
        /* 6333 */
        mplew.writeInt(skill);
        /* 6334 */
        mplew.writeShort(1);
        /* 6335 */
        mplew.writeInt(extraSkill);

        /* 6337 */
        return mplew.getPacket();

    }



    public static byte[] GameExit() {
        /* 6341 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6343 */
        mplew.writeShort(SendPacketOpcode.GAME_EXIT.getValue());

        /* 6345 */
        return mplew.getPacket();

    }




    public static byte[] OnOpcodeEncryption(int nBlockSize, byte[] aBuffer) {
        /* 6350 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 6351 */
        mplew.writeShort(SendPacketOpcode.OPCODE_ENCRYPTION.getValue());

        /* 6353 */
        mplew.writeInt(nBlockSize);
        /* 6354 */
        mplew.writeInt(aBuffer.length);
        /* 6355 */
        mplew.write(aBuffer);



















        /* 6375 */
        return mplew.getPacket();

    }



    public static byte[] LP_UserBonusAttackRequest(int skillid, int n2, List<Integer> list) {
        /* 6379 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 6380 */
        mplew.writeShort(SendPacketOpcode.USER_BONUS_ATTACK_REQUEST.getValue());
        /* 6381 */
        mplew.writeInt(skillid);
        /* 6382 */
        mplew.writeInt(list.size());
        /* 6383 */
        mplew.write((list.size() <= 0) ? 1 : 0);
        /* 6384 */
        mplew.writeInt(0);
        /* 6385 */
        mplew.writeInt(n2);
        /* 6386 */
        Iterator<Integer> iterator = list.iterator();
        /* 6387 */
        while (iterator.hasNext()) {
            /* 6388 */
            mplew.writeInt(((Integer) iterator.next()).intValue());
            /* 6389 */
            mplew.writeInt(0);
            /* 6390 */
            if (skillid == 400041030) {
                /* 6391 */
                mplew.writeInt(0);

            }

        }
        /* 6394 */
        return mplew.getPacket();

    }




    public static byte[] showZakumStep() {
        /* 6399 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 6400 */
        mplew.writeShort(SendPacketOpcode.SHOW_ZAKUM_STEP.getValue());

        /* 6402 */
        mplew.write(HexTool.getByteArrayFromHexString("12 00 00 00 04 00 7A 64 63 37 00 01 00 00 00 00 FE FF FF F9 FF FF FF 04 00 7A 64 63 38 00 01 00 00 00 4C FE FF FF FB FF FF FF 04 00 7A 64 63 39 00 01 00 00 00 9A FE FF FF F8 FF FF FF 05 00 7A 64 63 31 36 00 01 00 00 00 6B 01 00 00 F9 FF FF FF 05 00 7A 64 63 31 37 00 01 00 00 00 B7 01 00 00 FB FF FF FF 05 00 7A 64 63 31 38 00 01 00 00 00 05 02 00 00 F8 FF FF FF 04 00 7A 64 63 35 00 01 00 00 00 49 FE FF FF 9B FF FF FF 04 00 7A 64 63 34 00 01 00 00 00 FE FD FF FF 9A FF FF FF 04 00 7A 64 63 36 00 01 00 00 00 96 FE FF FF 9D FF FF FF 05 00 7A 64 63 31 33 00 01 00 00 00 80 01 00 00 9D FF FF FF 05 00 7A 64 63 31 34 00 01 00 00 00 D0 01 00 00 9A FF FF FF 05 00 7A 64 63 31 35 00 01 00 00 00 22 02 00 00 9B FF FF FF 05 00 7A 64 63 31 30 00 01 00 00 00 5E 01 00 00 43 FF FF FF 05 00 7A 64 63 31 31 00 01 00 00 00 AA 01 00 00 42 FF FF FF 05 00 7A 64 63 31 32 00 01 00 00 00 F8 01 00 00 45 FF FF FF 04 00 7A 64 63 31 00 01 00 00 00 30 FE FF FF 46 FF FF FF 04 00 7A 64 63 32 00 01 00 00 00 7C FE FF FF 45 FF FF FF 04 00 7A 64 63 33 00 01 00 00 00 CA FE FF FF 48 FF FF FF"));

        /* 6404 */
        return mplew.getPacket();

    }



    public static byte[] UserNlzdRequest(MapleCharacter player, List<Integer> moboids, List<Integer> mode) {
        /* 6408 */
        log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());
        /* 6409 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6411 */
        mplew.writeShort(SendPacketOpcode.USER_FORCEATOM.getValue());
        /* 6412 */
        mplew.writeInt(player.getId());
        /* 6413 */
        mplew.writeInt(155001103);

        /* 6415 */
        mplew.writeInt(mode.size());

        /* 6417 */
        for (int i = 0; i < mode.size(); i++) {
            /* 6418 */
            mplew.writeInt(((Integer) mode.get(i)).intValue());
            /* 6419 */
            mplew.writeInt((((Integer) mode.get(i)).intValue() == 43) ? 155001000 : ((((Integer) mode.get(i)).intValue() == 44) ? 155101002 : ((((Integer) mode.get(i)).intValue() == 45) ? 155111003 : ((((Integer) mode.get(i)).intValue() == 46) ? 155121003 : 0))));
            /* 6420 */
            mplew.writeInt(moboids.size());
            /* 6421 */
            for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) {
                int moboid = ((Integer) iterator.next()).intValue();
                /* 6422 */
                mplew.writeInt(moboid);

                /* 6424 */
                int atkcount = (((Integer) mode.get(i)).intValue() == 43) ? 2 : ((((Integer) mode.get(i)).intValue() == 44) ? 8 : ((((Integer) mode.get(i)).intValue() == 45) ? 6 : ((((Integer) mode.get(i)).intValue() == 46) ? 8 : 0)));
                /* 6425 */
                for (int j = 0; j < atkcount; j++) {
                    /* 6426 */
                    mplew.write(1);
                    /* 6427 */
                    mplew.writeInt(Randomizer.rand(701, 1001));
                    /* 6428 */
                    mplew.writeInt(Randomizer.rand(902, 908));

                    /* 6430 */
                    mplew.writeInt(Randomizer.rand(5, 10));
                    /* 6431 */
                    mplew.writeInt(Randomizer.rand(5, 7));
                    /* 6432 */
                    mplew.writeInt(Randomizer.rand(54, 59));
                    /* 6433 */
                    mplew.writeInt(0);
                    /* 6434 */
                    mplew.writeInt(0);
                    /* 6435 */
                    mplew.writeInt(0);
                    /* 6436 */
                    mplew.writeInt(DateUtil.getSpecialNowiTime());
                    /* 6437 */
                    mplew.writeInt(1);
                    /* 6438 */
                    mplew.writeInt(0);
                    /* 6439 */
                    mplew.writeInt(0);

                }
                /* 6441 */
                mplew.write(0);
            }


        }
        /* 6444 */
        return mplew.getPacket();

    }






    public static byte[] hiddenTailAndEar(MapleCharacter player, boolean TailandEar, boolean show) {
        /* 6451 */
        log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());
        /* 6452 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6454 */
        mplew.writeShort(SendPacketOpcode.HIDDEN_TAIL_ADN_EAR.getValue());
        /* 6455 */
        mplew.writeInt(player.getId());
        /* 6456 */
        mplew.writeBool(TailandEar);
        /* 6457 */
        mplew.writeBool(show);

        /* 6459 */
        return mplew.getPacket();

    }




    public static byte[] test(MapleCharacter player, int moboid) {
        /* 6464 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 6465 */
        mplew.writeShort(551);
        /* 6466 */
        mplew.writeInt(901);
        /* 6467 */
        mplew.writeInt(player.getId());
        /* 6468 */
        mplew.writeInt(1);
        /* 6469 */
        mplew.writeInt(1);
        /* 6470 */
        mplew.writeInt(1);
        /* 6471 */
        mplew.writeInt(moboid);

        /* 6473 */
        return mplew.getPacket();

    }




    public static byte[] showSceenEffect(int opcode, String text, int n2) {
        /* 6478 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6480 */
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        /* 6481 */
        mplew.write(opcode);
        /* 6482 */
        mplew.writeMapleAsciiString(text);
        /* 6483 */
        if (opcode == FieldEffectOpcode.Screen_AutoLetterBox.getValue() || opcode == FieldEffectOpcode.Screen_Delayed.getValue() || opcode == FieldEffectOpcode.TopScreen.getValue()) {
            /* 6484 */
            mplew.writeInt(n2);

        }

        /* 6487 */
        return mplew.getPacket();

    }







    public static byte[] RegisterExtraSkill(MapleCharacter chr, int skill, List<Integer> skill2) {
        /* 6495 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6497 */
        mplew.writeShort(SendPacketOpcode.REGISTER_EXTRA_SKILL.getValue());
        /* 6498 */
        mplew.writeInt((chr.getTruePosition()).x);
        /* 6499 */
        mplew.writeInt((chr.getTruePosition()).y);
        /* 6500 */
        mplew.writeShort(1);
        /* 6501 */
        mplew.writeInt(skill);
        /* 6502 */
        mplew.writeShort(skill2.size());
        /* 6503 */
        for (Integer skillid : skill2) {
            /* 6504 */
            mplew.writeInt(skillid.intValue());

        }

        /* 6507 */
        return mplew.getPacket();

    }






    public static byte[] WindWall(MapleCharacter player, List<Integer> moboids) {
        /* 6514 */
        log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());
        /* 6515 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6517 */
        mplew.writeShort(SendPacketOpcode.USER_FORCEATOM.getValue());
        /* 6518 */
        mplew.writeInt(player.getId());
        /* 6519 */
        mplew.writeInt(400031031);
        /* 6520 */
        mplew.writeInt(moboids.size());
        /* 6521 */
        int[] baseArr = {100, 200, 300, 400, 500, 600, 700, 800, 900};
        /* 6522 */
        int index = (int) (Math.random() * baseArr.length);
        /* 6523 */
        int rand = baseArr[index];
        /* 6524 */
        for (int i = 0; i < moboids.size(); i++) {
            /* 6525 */
            mplew.writeInt(51);
            /* 6526 */
            mplew.writeInt(400031031);
            /* 6527 */
            mplew.writeInt(1);

            /* 6529 */
            mplew.writeInt(((Integer) moboids.get(i)).intValue());
            /* 6530 */
            mplew.write(1);
            /* 6531 */
            if (i == 1) {
                /* 6532 */
                rand++;

            }
            /* 6534 */
            if (i == 2) {
                /* 6535 */
                rand += 2;

            }
            /* 6537 */
            mplew.writeInt(rand);

            /* 6539 */
            index = (int) (Math.random() * baseArr.length);
            /* 6540 */
            rand = baseArr[index];
            /* 6541 */
            if (i == 1) {
                /* 6542 */
                rand++;

            }
            /* 6544 */
            if (i == 2) {
                /* 6545 */
                rand += 2;

            }
            /* 6547 */
            mplew.writeInt(rand);
            /* 6548 */
            mplew.writeInt(Randomizer.rand(10, 20));
            /* 6549 */
            mplew.writeInt(Randomizer.rand(5, 20));
            /* 6550 */
            mplew.writeInt(Randomizer.rand(50, 70));
            /* 6551 */
            mplew.writeInt(10);
            /* 6552 */
            mplew.writeInt(0);
            /* 6553 */
            mplew.writeInt(0);
            /* 6554 */
            mplew.writeInt(DateUtil.getSpecialNowiTime());
            /* 6555 */
            mplew.writeInt(3);
            /* 6556 */
            mplew.writeInt(0);
            /* 6557 */
            mplew.writeInt(0);

            /* 6559 */
            mplew.write(0);

        }

        /* 6562 */
        return mplew.getPacket();

    }



    public static byte[] GuidedArrow(int moboids) {
        /* 6566 */
        log.trace("调用"+Thread.currentThread() .getStackTrace()[1].getMethodName());
        /* 6567 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6569 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_STATUS.getValue());
        /* 6570 */
        mplew.writeInt(201);
        /* 6571 */
        mplew.writeInt(444858);
        /* 6572 */
        mplew.writeInt(1);
        /* 6573 */
        mplew.writeInt(1);
        /* 6574 */
        mplew.writeInt(1);
        /* 6575 */
        mplew.writeInt(moboids);
        /* 6576 */
        return mplew.getPacket();

    }




    public static final byte[] XLHY_SKILL_RESULT() {
        /* 6581 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6583 */
        mplew.writeShort(SendPacketOpcode.XLHY_SKILL_RESULT.getValue());
        /* 6584 */
        mplew.writeInt(15001020);
        /* 6585 */
        mplew.writeInt(400051007);
        /* 6586 */
        mplew.writeInt(1);
        /* 6587 */
        return mplew.getPacket();

    }



    public static final byte[] ShowMapleUnion(int coin, MapleUnion union) {
        /* 6591 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6593 */
        mplew.writeShort(SendPacketOpcode.SHOW_MAPLE_UNION.getValue());
        /* 6594 */
        mplew.writeInt(coin);
        /* 6595 */
        writeMapleUnion(mplew, union);

        /* 6597 */
        return mplew.getPacket();

    }



    public static final byte[] UpdateMapleUnion(MapleUnion union) {
        /* 6601 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6603 */
        mplew.writeShort(SendPacketOpcode.UPDATE_MAPLE_UNION.getValue());
        /* 6604 */
        writeMapleUnion(mplew, union);

        /* 6606 */
        return mplew.getPacket();

    }



    public static final byte[] LoadMapleUnion(MapleUnion union, int slot) {
        /* 6610 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6612 */
        mplew.writeShort(SendPacketOpcode.MAPLE_UNION_PRESET_SLOT.getValue());
        /* 6613 */
        mplew.writeInt(slot);
        /* 6614 */
        mplew.writeBool(true);
        /* 6615 */
        for (int i = 0; i < 8; i++) {
            /* 6616 */
            mplew.writeInt(i);

        }
        /* 6618 */
        CurrCharacterMapleUnion(mplew, union);

        /* 6620 */
        return mplew.getPacket();

    }






    public static void CurrCharacterMapleUnion(MaplePacketLittleEndianWriter mplew, MapleUnion union) {
        /* 6627 */
        mplew.writeInt(union.getCurrOnionMap().size());
        /* 6628 */
        for (MapleUnionData data : union.getCurrOnionMap().values()) {
            /* 6629 */
            writeMapleUnionData(mplew, data);

        }

    }



    public static final void writeMapleUnion(MaplePacketLittleEndianWriter mplew, MapleUnion union) {
        /* 6634 */
        mplew.writeInt(union.getRank());
        /* 6635 */
        AllCharacterMapleUnion(mplew, union);
        /* 6636 */
        CurrCharacterMapleUnion(mplew, union);
        /* 6637 */
        mplew.write(0);

    }






    public static void AllCharacterMapleUnion(MaplePacketLittleEndianWriter mplew, MapleUnion union) {
        /* 6644 */
        mplew.writeInt(union.getAllCharacterMap().size());
        /* 6645 */
        for (MapleUnionData data : union.getAllCharacterMap().values()) {
            /* 6646 */
            writeMapleUnionData(mplew, data);

        }

    }



    public static final void writeMapleUnionData(MaplePacketLittleEndianWriter mplew, MapleUnionData data) {
        /* 6651 */
        mplew.writeInt(data.getType());
        /* 6652 */
        mplew.writeInt(data.getCid());
        /* 6653 */
        mplew.writeInt(data.getLevel());
        /* 6654 */
        mplew.writeInt(data.getJob());
        /* 6655 */
        mplew.writeInt(0);
        /* 6656 */
        mplew.writeInt(data.getRotate());
        /* 6657 */
        mplew.writeInt(data.getBoardindex());
        /* 6658 */
        mplew.writeInt(data.getLocal());
        /* 6659 */
        mplew.writeMapleAsciiString(data.getName());
        /* 6660 */
        if (data.getType() == 2) {
            /* 6661 */
            mplew.writeMapleAsciiString("");

        }

    }



    public static byte[] SummonedBeholderRevengeAttack(int cid, int summonoid, int skillid) {
        /* 6666 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6668 */
        mplew.writeShort(SendPacketOpcode.SOULPOWER_SHOCKED.getValue());
        /* 6669 */
        mplew.writeInt(cid);
        /* 6670 */
        mplew.writeInt(summonoid);
        /* 6671 */
        mplew.writeInt(skillid);
        /* 6672 */
        mplew.write(1);
        /* 6673 */
        return mplew.getPacket();

    }



    public static byte[] removeWreckages(int cid, List<Integer> wreckagesIDs) {
        /* 6677 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 6679 */
        mplew.writeShort(SendPacketOpcode.DEL_WRECKAGE.getValue());
        /* 6680 */
        mplew.writeInt(cid);
        /* 6681 */
        mplew.writeInt(wreckagesIDs.size());
        /* 6682 */
        mplew.write(0);
        /* 6683 */
        wreckagesIDs.forEach(mplew::writeInt);

        /* 6685 */
        return mplew.getPacket();

    }




    public static byte[] addWreckage(int cid, Point point, int duration, int addWreckages, int sourceid, int n5, int evanWreckagesSize) {
        /* 6690 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 6691 */
        mplew.writeShort(SendPacketOpcode.ADD_WRECKAGE.getValue());
        /* 6692 */
        mplew.writeInt(cid);
        /* 6693 */
        mplew.writeInt(point.x);
        /* 6694 */
        mplew.writeInt(point.y);
        /* 6695 */
        mplew.writeInt(duration);
        /* 6696 */
        mplew.writeInt(addWreckages);
        /* 6697 */
        mplew.writeInt(sourceid);
        /* 6698 */
        mplew.writeInt(n5);
        /* 6699 */
        mplew.writeInt(evanWreckagesSize);
        /* 6700 */
        return mplew.getPacket();

    }

}


/* Location:              C:\PGX\Server.jar!\tools\MaplePacketCreator.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */